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]
Other format: [Raw text]

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


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