c++/10248: including system headers makes g++ barf

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Fri Mar 28 13:16:00 GMT 2003


The following reply was made to PR c++/10248; it has been noted by GNATS.

From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
To: jhs@ocf.berkeley.edu
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/10248: including system headers makes g++ barf
Date: 28 Mar 2003 12:46:43 +0100

 jhs@ocf.berkeley.edu writes:
 
 > SunOS mustard 5.8 Generic_108528-15 sun4u sparc SUNW,UltraAX-i2
 > >Description:
 > Including /usr/include/sys/stat.h causes my compile to fail. From what I can see, there is no reason this should be happening, and it works correctly on gcc 2.95.2
 > 
 > scott@mustard:~> gcc -v
 > Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/3.2.2/specs
 > Configured with: ../configure --srcdir=/usr/local/src/gnu/gcc-3.2.2/H-sun4-sunos5/.. --infodir=/usr/local/lib/info --with-gxx-include-dir=$(libsubdir)/g++-include --bindir=/usr/local/lang/gcc-3.2.2/bin
 > Thread model: posix
 > gcc version 3.2.2
 > scott@mustard:~> g++ -v
 > Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/default/specs
 > gcc version 2.95.2 19991024 (release)
 
 You generally need to build gcc on the OS version it is intended to run on
 (Solaris 8 in this case).  Since the fixincludes step of the build creates
 modified versions of some system headers and places them in a private
 include directory, you may wind up mixing unmodified new (Solaris 8) and
 modified old (Solaris 2.5.1 and 2.6) headers in one compilation, leading to
 all sorts of problems.
 
 Thus I cannot reproduce your problem with gcc 3.2.3 built on Solaris 8 and
 running on the same release.
 
 	Rainer



More information about the Gcc-prs mailing list