This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Statement expression with function-call variable lifetime
- From: Daniel Jacobowitz <drow at false dot org>
- To: Shaun Jackman <sjackman at gmail dot com>
- Cc: gcc at sources dot redhat dot com
- Date: Wed, 29 Jun 2005 13:38:39 -0400
- Subject: Re: Statement expression with function-call variable lifetime
- References: <7f45d93905062910344b524c33@mail.gmail.com>
On Wed, Jun 29, 2005 at 10:34:20AM -0700, Shaun Jackman wrote:
> the statement expression macro? My best idea was to use alloca, but it
> wouldn't look pretty. Can someone confirm that memory allocated with
> alloca would last the lifetime of the function call, and not the
> lifetime of the statement expression?
Yes, that's correct (and the only way to do this).
--
Daniel Jacobowitz
CodeSourcery, LLC