From owner-freebsd-current Tue Aug 27 17:18:13 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51A3E37B401 for ; Tue, 27 Aug 2002 17:18:06 -0700 (PDT) Received: from fump.kawo2.rwth-aachen.de (fump.kawo2.RWTH-Aachen.DE [134.130.181.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22D1D43E6A for ; Tue, 27 Aug 2002 17:18:05 -0700 (PDT) (envelope-from alex@fump.kawo2.rwth-aachen.de) Received: from fump.kawo2.rwth-aachen.de (localhost [127.0.0.1]) by fump.kawo2.rwth-aachen.de (8.12.5/8.12.5) with ESMTP id g7S0A7sJ002528; Wed, 28 Aug 2002 02:10:07 +0200 (CEST) (envelope-from alex@fump.kawo2.rwth-aachen.de) Received: (from alex@localhost) by fump.kawo2.rwth-aachen.de (8.12.5/8.12.5/Submit) id g7S0A6qQ002527; Wed, 28 Aug 2002 02:10:06 +0200 (CEST) Date: Wed, 28 Aug 2002 02:10:06 +0200 From: Alexander Langer To: freebsd-current@FreeBSD.org Cc: Gerald Pfeifer Subject: gcc 3.1 / streambuf.h broken with "using namespace std;" Message-ID: <20020828021006.D1412@fump.kawo2.rwth-aachen.de> Mail-Followup-To: Alexander Langer , freebsd-current@FreeBSD.org, Gerald Pfeifer Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-PGP-Fingerprint: 7EC1 5B98 4554 2A63 9079 2B2F 9A94 CD6F 7F14 EFA4 X-PGP-at: finger alex@big.endian.de X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message