This is the mail archive of the gcc-bugs@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]

egcs 1.1.2 - -nostdinc bug


	Hello.

	In order to include only the right files (e.g. the ones in 
	/usr/local/...) I have to use -nostdinc and then specify the desired
	search path. The problem is that -nostdinc seems to have a nasty side
	effect. The following program can be compiled without errors:

#include "confdefs.h"

#include <stdlib.h>
#include <unistd.h>

int main() {

char buffer[200];
gethostname(buffer, 200);

return 0; }

	However here is what I get when I try to use -nostdinc:

eniac 137% gcc -v --save-temps -nostdinc -I/usr/include -pedantic-errors
conftest.C
Reading specs from
/usr/local/lib/gcc-lib/mips-sgi-irix6.5/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/local/lib/gcc-lib/mips-sgi-irix6.5/egcs-2.91.66/cpp -lang-c++
-nostdinc -v -I/usr/include -undef -D__GNUC__=2 -D__GNUG__=2
-D__cplusplus -D__GNUC_MINOR__=91 -Dunix -Dmips -Dsgi -Dhost_mips
-DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C
-D__DSO__ -D__unix__ -D__mips__ -D__sgi__ -D__host_mips__ -D__MIPSEB__
-D_MIPSEB -D__SYSTYPE_SVR4__ -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C
-D__DSO__ -D__unix -D__mips -D__sgi -D__host_mips -D__MIPSEB
-D__SYSTYPE_SVR4 -Asystem(unix) -Asystem(svr4) -Acpu(mips)
-Amachine(sgi) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -pedantic-errors
-D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS
-D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__EXTENSIONS__
-D_SGI_SOURCE -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS3 -D_ABIN32=2
-D_MIPS_SIM=_ABIN32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32
-D_COMPILER_VERSION=601 -U__mips -D__mips=3 -D__mips64 conftest.C
conftest.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) [AL 1.1, MM
40] SGI running IRIX 6.x
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
End of search list.
In file included from conftest.C:3:
/usr/include/stdlib.h:6: ANSI C does not allow `#ident'
In file included from /usr/include/stdlib.h:34,
                 from conftest.C:3:
/usr/include/standards.h:19: ANSI C does not allow `#ident'
In file included from /usr/include/stdlib.h:35,
                 from conftest.C:3:
/usr/include/sgidefs.h:19: ANSI C does not allow `#ident'
In file included from /usr/include/stdlib.h:133,
                 from conftest.C:3:
/usr/include/locale_attr.h:21: ANSI C does not allow `#ident'
In file included from /usr/include/stdlib.h:250,
                 from conftest.C:3:
/usr/include/getopt.h:3: ANSI C does not allow `#ident'
In file included from conftest.C:4:
/usr/include/unistd.h:6: ANSI C does not allow `#ident'
In file included from /usr/include/unistd.h:277,
                 from conftest.C:4:
/usr/include/sys/types.h:27: ANSI C does not allow `#ident'
In file included from /usr/include/sys/types.h:372,
                 from /usr/include/unistd.h:277,
                 from conftest.C:4:
/usr/include/sys/bsd_types.h:21: ANSI C does not allow `#ident'
In file included from /usr/include/sys/bsd_types.h:44,
                 from /usr/include/sys/types.h:372,
                 from /usr/include/unistd.h:277,
                 from conftest.C:4:
/usr/include/sys/select.h:29: ANSI C does not allow `#ident'
In file included from /usr/include/sys/select.h:80,
                 from /usr/include/sys/bsd_types.h:44,
                 from /usr/include/sys/types.h:372,
                 from /usr/include/unistd.h:277,
                 from conftest.C:4:
/usr/include/string.h:6: ANSI C does not allow `#ident'
In file included from /usr/include/unistd.h:480,
                 from conftest.C:4:
/usr/include/sys/uio.h:12: ANSI C does not allow `#ident'
/usr/include/sys/uio.h:13: ANSI C does not allow `#ident'
In file included from /usr/include/unistd.h:481,
                 from conftest.C:4:
/usr/include/utime.h:6: ANSI C does not allow `#ident'
In file included from /usr/include/unistd.h:482,
                 from conftest.C:4:
/usr/include/re_comp.h:6: ANSI C does not allow `#ident'

	Herewith attached you can find the file conftest.ii.

						Regards,
						Roberto

conftest.ii.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]