alloca and c++
Gabriel Dos Reis
gdr@codesourcery.com
Fri Feb 1 12:13:00 GMT 2002
Devang Patel <dpatel@apple.com> writes:
| Hello,
|
| Following gives me undefined (not undeclared) 'alloca' error in C++.
| Is it expected ?
Yes.
Alloca() is not a standard function. And on systems I've seen it used,
the appropriate header was included.
| Or am I suppose to use __builtin_alloca() to get gcc-built-in alloca()
| in C++ source ?
Certainly.
And declaring standard functions "by hand" is evil. Use appropriate
header for that.
-- Gaby
More information about the Gcc
mailing list