This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c/14649: Constant folding builtins in initializers
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 7 Jun 2004 16:48:54 +0000 (UTC)
- Subject: Re: [PATCH] PR c/14649: Constant folding builtins in initializers
- References: <Pine.LNX.4.44.0406070722210.2167-100000@www.eyesopen.com>
On Mon, 7 Jun 2004, Roger Sayle wrote:
> exist in the stack frame of the parser. This would allow us to determine
> correctly whether an expression is constant by each of the ISO language
> standards, allows us to throw away NON_LVALUE_EXPR nodes, avoids the
> TREE_NO_WARNING hack added to fold_builtin, handles ternary operators
> where the condition and one branch is constant, etc...
... get rid of TREE_COMPLEXITY, fix bug 11250, etc. - see my proposal in
comment#15 to bug 14711 (and elsewhere). (is_const would probably be more
like half a dozen flags rather than one, and you need to wrap type names
as well as expressions to get the constant expression rules correct; see
my discussion of constant expression issues
<http://groups.google.com/groups?selm=buh3kg%24623%241%40pegasus.csx.cam.ac.uk>.)
> Ok for mainline? Would a backport be suitable for 3.4.1?
OK for mainline and 3.4 branch.
--
Joseph S. Myers
jsm@polyomino.org.uk