This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's statement expression extension
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: GCC's statement expression extension
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 02 Aug 2000 20:59:10 -0300
- Cc: mark at codesourcery dot com, per at bothner dot com, gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <200008020114.SAA09384@kankakee.wrs.com>
On Aug 1, 2000, Mike Stump <mrs@windriver.com> wrote:
>> From: Alexandre Oliva <aoliva@redhat.com>
>> Date: 29 Jul 2000 18:07:12 -0300
>> On Jul 29, 2000, Mark Mitchell <mark@codesourcery.com> wrote:
>> > There's really no right answer -- the other answer is to wait
>> > until the end of the enclosing full expression.
>> It appears to me that this would solve all of the problems you've
>> listed so far, and it seems reasonably sound to me.
> I don't think it is reasonable. The words in the standard say that
> certainly by the time the statement containing an expression ends, the
> temps are gone.
Yep. But in the case of statement expressions, there isn't just one
statement containing the expression:
({ foo(); bar(); });
Why is it any ``more correct'' to destruct the temporary returned by
foo() in the statement `foo();' that it is to destruct it at the end
of the full enclosing statement?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me