diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-07 19:58:29 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-07 19:58:29 +0000 |
commit | 1d2bb6555da06fdaae73c53f9aaa38a688e301cd (patch) | |
tree | 67d27c098a1229b2020c6d36424e17ce028e09da /gcc/stor-layout.c | |
parent | f09431f142f803a83ce9555eece5a4238f2be8a6 (diff) | |
download | gcc-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/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 6d662377c6d..12ccd803999 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); |