diff options
author | Ian Lance Taylor <ian@airs.com> | 2005-01-17 18:54:18 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2005-01-17 18:54:18 +0000 |
commit | 812ad3382cbadfa9fa39f4feb16f8fb3ce63877b (patch) | |
tree | 658aaddcc8ed11cac62e7a64e52face96a7952f4 /gcc | |
parent | f8ef82ea63cb3c20dea272738484a08e9a8203fd (diff) | |
download | gcc-812ad3382cbadfa9fa39f4feb16f8fb3ce63877b.zip gcc-812ad3382cbadfa9fa39f4feb16f8fb3ce63877b.tar.gz gcc-812ad3382cbadfa9fa39f4feb16f8fb3ce63877b.tar.bz2 |
re PR c/5675 (const variables wrongly considered part of constant expressions (gcc.dg/c9[09]-const-expr-3.c))
PR c/5675
* c-typeck.c (build_c_cast): Revert patch of 2003-02-16: don't
fold constant variables into initial values.
From-SVN: r93769
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-typeck.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa24164..40a06bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-01-17 Ian Lance Taylor <ian@airs.com> + + PR c/5675 + * c-typeck.c (build_c_cast): Revert patch of 2003-02-16: don't + fold constant variables into initial values. + 2005-01-17 Kazu Hirata <kazu@cs.umass.edu> * tree-cfg.c (tree_can_merge_blocks_p): Reorder two checks. diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index e173c6a..0d7c019 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3202,9 +3202,6 @@ build_c_cast (tree type, tree expr) pedwarn ("ISO C forbids conversion of object pointer to function pointer type"); ovalue = value; - /* Replace a nonvolatile const static variable with its value. */ - if (optimize && TREE_CODE (value) == VAR_DECL) - value = decl_constant_value (value); value = convert (type, value); /* Ignore any integer overflow caused by the cast. */ |