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] |
On Apr 17, 2001, Everard Kamphorst <everard@flatearthscience.com> wrote:
> When using the GCC 3.0 C++ compiler I get an error when compiling
> the following test program:
> test.cpp:5: `alloca' undeclared (first use this function)
Yep. That's correct. C++ doesn't permit one to call a function that
hasn't been declared. GCC 3.0 is beginning to enforce that rule. As
a temporary work-around, use -fpermissive to disable it. As a
long-term fix, get the bug fixed, i.e., make sure you've got a
declaration of alloca before calling it.
In the particular case of alloca, you may replace it with
__builtin_alloca, if you know you'll be compiling your code with GCC.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |