This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: C++14 implementation status
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: Ulrich Drepper <drepper at gmail dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Date: Thu, 13 Jun 2013 10:13:49 -0500
- Subject: Re: C++14 implementation status
- References: <CAH6eHdQb=PhvSVhE79Gv_0CxNq1PNDAtnHqRN+qAHn3-rhtWzA at mail dot gmail dot com> <51B5EFD6 dot 4060806 at verizon dot net> <alpine dot DEB dot 2 dot 10 dot 1306101735450 dot 28948 at stedding dot saclay dot inria dot fr> <CAOPLpQd2ecHpGQP78buFVk9MSzCrwj9+DQKNOQagFYNfDpu5_Q at mail dot gmail dot com> <51B9DE42 dot 3050409 at verizon dot net>
On Thu, Jun 13, 2013 at 9:59 AM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
> On 06/10/2013 02:08 PM, Ulrich Drepper wrote:
>>
>> On Mon, Jun 10, 2013 at 11:45 AM, Marc Glisse <marc.glisse@inria.fr>
>> wrote:
>>>
>>> void f(int n, void *p=alloca(n));
>>
>> Before anyone uses this as an example, it is really wrong to use
>> alloca inside a parameter list. The alloca allocation might interfere
>> with pushing parameters on the stack for function calls. This was at
>> least true for older compilers but I think it's still a valid concern.
>>
> So it looks like compiler magic it is. Is the always_inline trick still a
> possibility?)
Before we talk about trick, I think we need to understand
the model. Alloca is essentially a directive to
grow activation record by a certain amount.
Parameters are not always part of the activation record
depending on the ABI, and even if they are, depending
on the calling convention it may not be possible to
arbitrarily expand the allocated space.
-- Gaby