diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-05-07 19:58:29 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-05-07 19:58:29 +0000 |
commit | c99c0026305731b71c697a84d82818e28ad8aaaf (patch) | |
tree | 67d27c098a1229b2020c6d36424e17ce028e09da /gcc/ada | |
parent | 1400c8e5013a0901298b3adfeb9c5dbfcef2f494 (diff) | |
download | gcc-c99c0026305731b71c697a84d82818e28ad8aaaf.zip gcc-c99c0026305731b71c697a84d82818e28ad8aaaf.tar.gz gcc-c99c0026305731b71c697a84d82818e28ad8aaaf.tar.bz2 |
langhooks.h (lang_hooks_for_types): Change global_bindings_p's return type to bool and adjust comment.
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.
From-SVN: r173535
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 18c56d0..b13e734 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,7 +1,11 @@ +2011-05-07 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/gigi.h (global_bindings_p): Adjust prototype. + * gcc-interface/utils.c (global_bindings_p): Return bool and simplify. + 2011-05-05 Nathan Froyd <froydnj@codesourcery.com> - * gcc-interface/trans.c (Case_Statement_to_gnu): Call - build_case_label. + * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label. 2011-05-05 Nathan Froyd <froydnj@codesourcery.com> diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 8c69e75..c1f1217 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -422,8 +422,8 @@ extern GTY(()) tree gnat_raise_decls_ext[(int) LAST_REASON_CODE + 1]; /* Routines expected by the gcc back-end. They must have exactly the same prototype and names as below. */ -/* Returns nonzero if we are currently in the global binding level. */ -extern int global_bindings_p (void); +/* Return true if we are in the global binding level. */ +extern bool global_bindings_p (void); /* Enter and exit a new binding level. */ extern void gnat_pushlevel (void); diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 1703a8b..cfa58b9 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -365,12 +365,12 @@ build_dummy_unc_pointer_types (Entity_Id gnat_desig_type, tree gnu_desig_type) TYPE_OBJECT_RECORD_TYPE (gnu_desig_type) = gnu_object_type; } -/* Return nonzero if we are currently in the global binding level. */ +/* Return true if we are in the global binding level. */ -int +bool global_bindings_p (void) { - return ((force_global || !current_function_decl) ? -1 : 0); + return force_global || current_function_decl == NULL_TREE; } /* Enter a new binding level. */ |