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]

Re: GCC's statement expression extension


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


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