This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Re: alloca and c++
- From: Devang Patel <dpatel at apple dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 1 Feb 2002 13:44:45 -0800
- Subject: Re: Re: alloca and c++
I found the solution, so let me answer my question myself,
On Friday, February 1, 2002, at 12:25 PM, Devang Patel wrote:
> So, my question is :
> Even though I include stdilib.h,
> I can not use alloca() in c++ and I must use __builtin_alloca().
> Is it True ?
This is true.
GCC C++ compiler does not allow to directly use alloca() as it is.
But, If I include alloca.h it works, because
alloca.h has
...
#define alloca(size) __builtin_alloca(size)
...
BTW, the Darwin system does not have alloca.h ;-)
(Darwin needs to get alloca.h ASAP)
Thank you,
Devang