diff options
author | Doug Evans <dje@gnu.org> | 1996-10-08 20:01:15 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1996-10-08 20:01:15 +0000 |
commit | a7c1916aeada1e930a54990b6d71d1cb7fa8715f (patch) | |
tree | 8d0bf8a9b3509cfbc24cf3f50f3e497d9ea0a330 /gcc | |
parent | b405396c6b309e02aa56c51158eb5c7f7d45fb9b (diff) | |
download | gcc-a7c1916aeada1e930a54990b6d71d1cb7fa8715f.zip gcc-a7c1916aeada1e930a54990b6d71d1cb7fa8715f.tar.gz gcc-a7c1916aeada1e930a54990b6d71d1cb7fa8715f.tar.bz2 |
(decl_constant_value): Delete test for ! TREE_PUBLIC.
From-SVN: r12916
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-typeck.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 0994ec3..ec26185 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -938,16 +938,16 @@ c_alignof_expr (expr) else return c_alignof (TREE_TYPE (expr)); } + /* Return either DECL or its known constant value (if it has one). */ static tree decl_constant_value (decl) tree decl; { - if (! TREE_PUBLIC (decl) - /* Don't change a variable array bound or initial value to a constant + if (/* Don't change a variable array bound or initial value to a constant in a place where a variable is invalid. */ - && current_function_decl != 0 + current_function_decl != 0 && ! pedantic && ! TREE_THIS_VOLATILE (decl) && TREE_READONLY (decl) && ! ITERATOR_P (decl) |