This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: sparc-sun-solaris2.8 bootstrap failure: libstdc++ vs /usr/include/stdio_impl.h


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


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