summaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-07 19:58:29 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-07 19:58:29 +0000
commit1d2bb6555da06fdaae73c53f9aaa38a688e301cd (patch)
tree67d27c098a1229b2020c6d36424e17ce028e09da /gcc/go
parentf09431f142f803a83ce9555eece5a4238f2be8a6 (diff)
downloadgcc-1d2bb6555da06fdaae73c53f9aaa38a688e301cd.tar.gz
2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
* langhooks.h (lang_hooks_for_types): Change global_bindings_p's return type to bool and adjust comment. * fold-const.c (fold_range_test): Adjust call to global_bindings_p. (fold_mathfn_compare): Remove calls to global_bindings_p. (fold_inf_compare): Likewise. * stor-layout.c (variable_size): Adjust call to global_bindings_p. * c-tree.h (global_bindings_p): Adjust prototype. * c-decl.c (global_bindings_p): Return bool and simplify. ada/ * gcc-interface/gigi.h (global_bindings_p): Adjust prototype. * gcc-interface/utils.c (global_bindings_p): Return bool and simplify. cp/ * name-lookup.h (global_bindings_p): Adjust prototype. * name-lookup.c (global_bindings_p): Return bool. fortran/ * f95-lang.c (global_bindings_p): Return bool and simplify. go/ * go-lang.c (global_bindings_p): Return bool and simplify. java/ * java-tree.h (global_bindings_p): Adjust prototype. * decl.c (global_bindings_p): Return bool. lto/ * lto-lang.c (global_bindings_p): Return bool. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173535 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/ChangeLog4
-rw-r--r--gcc/go/go-lang.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 6df65976ccb..4136702481b 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * go-lang.c (global_bindings_p): Return bool and simplify.
+
2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
* go-gcc.cc (Gcc_backend::switch_statement): Call build_case_label.
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 5132e97cfe3..84c7f8d1591 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -308,10 +308,12 @@ go_langhook_builtin_function (tree decl)
return decl;
}
-static int
+/* Return true if we are in the global binding level. */
+
+static bool
go_langhook_global_bindings_p (void)
{
- return current_function_decl == NULL ? 1 : 0;
+ return current_function_decl == NULL_TREE;
}
/* Push a declaration into the current binding level. We can't