aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2011-05-07 19:58:29 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-05-07 19:58:29 +0000
commitc99c0026305731b71c697a84d82818e28ad8aaaf (patch)
tree67d27c098a1229b2020c6d36424e17ce028e09da /gcc/stor-layout.c
parent1400c8e5013a0901298b3adfeb9c5dbfcef2f494 (diff)
downloadgcc-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/stor-layout.c')
-rw-r--r--gcc/stor-layout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 6d66237..12ccd80 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -89,10 +89,10 @@ variable_size (tree size)
if (CONTAINS_PLACEHOLDER_P (size))
return self_referential_size (size);
- /* If the language-processor is to take responsibility for variable-sized
- items (e.g., languages which have elaboration procedures like Ada),
- just return SIZE unchanged. */
- if (lang_hooks.decls.global_bindings_p () < 0)
+ /* If we are in the global binding level, we can't make a SAVE_EXPR
+ since it may end up being shared across functions, so it is up
+ to the front-end to deal with this case. */
+ if (lang_hooks.decls.global_bindings_p ())
return size;
return save_expr (size);