This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: sparc-sun-solaris2.8 bootstrap failure: libstdc++ vs /usr/include/stdio_impl.h
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Cc: gcc at gcc dot gnu dot org, <libstdc++ at gcc dot gnu dot org>
- Date: 17 Mar 2002 17:01:10 +0100
- Subject: Re: sparc-sun-solaris2.8 bootstrap failure: libstdc++ vs /usr/include/stdio_impl.h
- Organization: CodeSourcery, LLC
- References: <Pine.BSF.4.44.0203171246130.23746-100000@pulcherrima.dbai.tuwien.ac.at>
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
[...]
| from /sw/test/gcc/cvs/libstdc++-v3/src/complex_io.cc:30:
| /usr/include/stdio_impl.h:39: conflicting types for `struct FILE'
| /files/pfeifer/OBJ-0317-09:57/gcc/include/floatingpoint.h:52: previous
| declaration as `typedef struct __FILE FILE'
This one boils down to:
typedef struct B A;
struct A { };
which although valid C is invalid C++ since FILE was declared at
/files/pfeifer/OBJ-0317-09:57/gcc/include/floatingpoint.h:52
to be a synonym for 'struct __FILE' and at
/usr/include/stdio_impl.h:39
as the name a class named 'FILE'.
/usr/include/stdio_impl.h is solaris system file; however I don't know
where /files/pfeifer/OBJ-0317-09:57/gcc/include/floatingpoint.h is
coming from. Gerald, could you enlighten us?
A fix would be to change
typedef struct __FILE FILE;
to
typedef struct FILE FILE;
when #includeing /files/pfeifer/OBJ-0317-09:57/gcc/include/floatingpoint.h
as a C++ file.
-- Gaby