This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

stmts_are_full_exprs_p


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]