alloca and c++

Devang Patel dpatel@apple.com
Fri Feb 1 11:01:00 GMT 2002


Hello,

Following gives me undefined  (not undeclared) 'alloca' error in C++.
Is it expected ?
Or am I suppose to use __builtin_alloca()  to get gcc-built-in alloca() 
in C++ source ?

[bardoli:/Volumes/Sandbox/Testing/gcc3]$ cat test_alloca.cc

#include <stdio.h>
void * alloca (size_t);
int main()
{
         char *s = (char *) alloca (10);
         return 0;
}

Thank you,
Devang



More information about the Gcc mailing list