This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/10248: including system headers makes g++ barf
- From: jhs at ocf dot berkeley dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 27 Mar 2003 21:05:54 -0000
- Subject: c++/10248: including system headers makes g++ barf
- Reply-to: jhs at ocf dot berkeley dot edu
>Number: 10248
>Category: c++
>Synopsis: including system headers makes g++ barf
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Thu Mar 27 21:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: jhs at ocf dot berkeley dot edu
>Release: gcc 3.2.2
>Organization:
>Environment:
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 at 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 at 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)
scott at mustard:~> gcc test.cc
In file included from test.cc:1:
/usr/include/sys/stat.h:258: 'blksize_t' is used as a type, but is not defined
as a type.
/usr/include/sys/stat.h:318: 'blksize_t' is used as a type, but is not defined
as a type.
scott at mustard:~> g++ test.cc
scott at mustard:~> ./a.out
hello
>How-To-Repeat:
#include <sys/stat.h>
#include <stdio.h>
int main() {
printf("hello\n");
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: