OS is OpenBSD 3.9-release. I installed gcc 4.1.1 in the standard GCC way (configure, gmake, gmake install), *not* using the OpenBSD package system, under /usr/local/ . This gcc compiles "hello, world" fine, and also a toy test program using 'new int[10]'.
However, attempting to compile a certain large application (a mixture of C, C++, Fortran 77, and Fortran 90) dies in a C++ file, reporting the following fatal errors inside an internal GCC header file: /usr/local/lib/gcc/i386-unknown-openbsd3.9/4.1.1/../../../../include/c++/4.1.1/new:84: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter /usr/local/lib/gcc/i386-unknown-openbsd3.9/4.1.1/../../../../include/c++/4.1.1/new:85: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter /usr/local/lib/gcc/i386-unknown-openbsd3.9/4.1.1/../../../../include/c++/4.1.1/new:88: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter /usr/local/lib/gcc/i386-unknown-openbsd3.9/4.1.1/../../../../include/c++/4.1.1/new:89: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter /usr/local/lib/gcc/i386-unknown-openbsd3.9/4.1.1/../../../../include/c++/4.1.1/new:94: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter /usr/local/lib/gcc/i386-unknown-openbsd3.9/4.1.1/../../../../include/c++/4.1.1/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter >From looking at timestamps, the file in question (the pathname resolves to /usr/local/include/c++/4.1.1/new) was indeed installed as part of this gcc. Compiling the same application works fine with the same gcc version (4.1.1) built on an i686-pc-linux-gnu system, so this problem seems to be specific to OpenBSD. I will attach the full output of '/usr/local/bin/g++ -v' and of '/usr/local/bin/g++ -v -save-temps ... my-file.cc', along with the gzipped .ii file generated by the latter command -- Summary: error "'operator new' takes type 'size_t' " reported inside gcc header file Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jthorn at aei dot mpg dot de GCC build triplet: i386-unknown-openbsd3.9 GCC host triplet: i386-unknown-openbsd3.9 GCC target triplet: i386-unknown-openbsd3.9 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28582