undeclared identifier

Everard Kamphorst everard@flatearthscience.com
Tue Apr 17 13:12:00 GMT 2001


When using the GCC 3.0 C++ compiler I get an error when compiling
the following test program:

#include <stdio.h>
#include <stdlib.h>

int main() {
  if ( alloca(10) )
    printf("Test passed\n");
  return 0;
}

---------------------------------------------------------------------
The error: (gcc test.cpp or g++ test.cpp)

test.cpp: In function `int main()':
test.cpp:5: `alloca' undeclared (first use this function)
test.cpp:5: (Each undeclared identifier is reported only once for each
function    it appears in.)
-----------------------------------------------------------------------

The same program compiles with no problems when using the C compiler
(gcc test.c) or using g++ version 2.95.2

GCC 3.0 was configured for sparc-sun-solaris2.8 using
../gcc-src/configure --prefix=/home/everard/devel/gcc

GCC 3.0 was built using make -j 2 bootstrap

Any ideas? - A simple configuration / settings issue?

I came across this problem when trying to rebuild ACE 5.1

	Thank you,

		Everard Kamphorst
		everard at flatearthscience dot com



More information about the Gcc mailing list