This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ast-optimizer-branch]: Simplify STMT_EXPR's
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 May 2002 16:59:12 -0400 (EDT)
- Subject: Re: [ast-optimizer-branch]: Simplify STMT_EXPR's
On Thu, 2 May 2002, Richard Henderson wrote:
> On Thu, May 02, 2002 at 03:12:52PM -0400, Daniel Berlin wrote:
> > > > a
> > > > b = ({<.....> <value>})
> > > >
> > > > becomes
> > > >
> > > > a
> > > > {<....> <new temporary> = <value>}
> > > > b = <new temporary>
>
> Doesn't this mean we have to come up with sensible semantics for
> C++ types with destructors here, wrt lifetime ot temporaries?
No, we're ignoring C++ for now. This is C simplification.
For C++, we'll have to turn it into
a
{
<new temporary declaration>
{
<...>
<new temporary> = <value>
}
b = <new temporary>
}
So that the temporary died in the right place (right now, the temporaries
are function local).
Or something.
--Dan
>
>
> r~
>