This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
stmts_are_full_exprs_p
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Mark Mitchell <mitchell at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Cc: gcc <gcc at gnu dot org>
- Date: Sat, 26 Jul 2003 21:42:51 +0100
- Subject: stmts_are_full_exprs_p
- Organization: Codesourcery LLC
Hi,
stmts_are_full_exprs_p is set to zero during initializers, to delay
temporary destruction, however comments and code in parts of the compiler
have confused that state with being inside a statement expression extension
({...}).
Although an initializer is a single statement, [12.2] tells us that
temporaries can be deleted within the initializer as each expression is
used. And, in fact, during initialization stmts_are_full_exprs_p is
set back to one for each initialization. AFAICT, stmts_are_full_exprs_p
is only zero during the bookkeeping for vector inits and other such
places.
I have bootstrapped and tested a compiler that never clears
stmts_are_full_exprs_p, without problem. I am having a hard time (i.e.
I can't) come up with a program that can detect the difference between
the original cc1plus and my patched one.
It would be really nice to get rid of stmts_are_full_exprs_p, can anyone
show me an example where its functionality is necessary?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk