Hi!

What's going on wrong here?
GCC 2.9x can compile this, 3.1 cannot:

alex@zerogravity ~ $ cat test.cc
using namespace std;

#include <iostream>
#include <strstream>
alex@zerogravity ~ $ c++  -pipe -g -fpic -DPIC -Wall -c test.cc 
In file included from /usr/include/g++/iostream.h:31,
                 from /usr/include/g++/strstream.h:32,
                 from /usr/include/g++/strstream:6,
                 from test.cc:4:
/usr/include/g++/streambuf.h:87: syntax error before `*' token
/usr/include/g++/streambuf.h:179: syntax error before `*' token
/usr/include/g++/streambuf.h:126: warning: `class ios' only defines private 
   constructors and has no friends
/usr/include/g++/streambuf.h:180: syntax error before `*' token
/usr/include/g++/streambuf.h:180: ISO C++ forbids declaration of `_tie' with no 
   type
/usr/include/g++/streambuf.h:180: `val' was not declared in this scope
/usr/include/g++/streambuf.h:180: syntax error before `return'
In file included from /usr/include/g++/iostream.h:31,
                 from /usr/include/g++/strstream.h:32,
                 from /usr/include/g++/strstream:6,
                 from test.cc:4:
/usr/include/g++/streambuf.h:25:1: unterminated #ifndef
In file included from /usr/include/g++/strstream.h:32,
                 from /usr/include/g++/strstream:6,
                 from test.cc:4:
/usr/include/g++/iostream.h:25:1: unterminated #ifndef
In file included from /usr/include/g++/strstream:6,
                 from test.cc:4:
/usr/include/g++/strstream.h:27:1: unterminated #ifndef
In file included from test.cc:4:
alex@zerogravity ~ $

(5 day old -CURRENT)

If you remove the "using namespace std;", it works, but libh uses a lot
of header files that want to use namespace std and are includes before
header files that use strstream, and TBH I'm too lazy to add "std::" on
bazillion places manually.

#if 0
Interestingly enough, I've found a VERY similar bug report at Mirosoft's
Support base ;-)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q192539&;
#endif

Thanks for any info :)

Alex

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to