From: Ian Lance Taylor Date: Mon, 17 Jan 2005 18:54:18 +0000 (+0000) Subject: re PR c/5675 (const variables wrongly considered part of constant expressions (gcc... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=812ad3382cbadfa9fa39f4feb16f8fb3ce63877b;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa24164f019..40a06bb61f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-01-17 Ian Lance Taylor + + 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 * tree-cfg.c (tree_can_merge_blocks_p): Reorder two checks. diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index e173c6a2d23..0d7c019cdbb 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. */