aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorMark Shinwell <shinwell@codesourcery.com>2006-06-04 16:28:55 +0000
committerMark Shinwell <shinwell@gcc.gnu.org>2006-06-04 16:28:55 +0000
commit63b4819753c735449a0915e62928fa6374cd70c3 (patch)
tree8043b65180715166e17c85119e10cb873f903255 /gcc/tree.h
parent7ec434b841e8120aad467db3efb249f536f5b819 (diff)
downloadgcc-63b4819753c735449a0915e62928fa6374cd70c3.zip
gcc-63b4819753c735449a0915e62928fa6374cd70c3.tar.gz
gcc-63b4819753c735449a0915e62928fa6374cd70c3.tar.bz2
tree.h: Declare folding_initializer.
gcc: * tree.h: Declare folding_initializer. * builtins.c (fold_builtin_constant_p): Give definite answer if folding inside an initializer. * fold-const.c: Define folding_initializer. (START_FOLD_INIT): Save and then set folding_initializer. (END_FOLD_INIT): Restore folding_initializer. gcc/testsuite: * gcc.c-torture/compile/builtin_constant_p.c: New test. From-SVN: r114358
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 55a5d8f..b377e38 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4142,6 +4142,10 @@ extern void using_eh_for_cleanups (void);
/* In fold-const.c */
+/* Non-zero if we are folding constants inside an initializer; zero
+ otherwise. */
+extern int folding_initializer;
+
/* Fold constants as much as possible in an expression.
Returns the simplified expression.
Acts only on the top level of the expression;