From 812ad3382cbadfa9fa39f4feb16f8fb3ce63877b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 17 Jan 2005 18:54:18 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/c-typeck.c | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) 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. */ -- 2.30.2