Thread View: gnu.g++.lib.bug
2 messages
2 total messages
Started by Klamer Schutte
Mon, 14 Dec 1992 21:16
bug in g++ 2.3.2 or libg++ 2.3
Author: Klamer Schutte
Date: Mon, 14 Dec 1992 21:16
Date: Mon, 14 Dec 1992 21:16
32 lines
1920 bytes
1920 bytes
Given this file: #include "int.List.h" #include <String.h> with int.List.h generated as: genclass int val List genclass int val defs (or with ref -- doesn't matter) g++ produces the error message: Reading specs from /usr/local/lib/gcc-lib/sun4/2.3.2/specs gcc version 2.3.2 /usr/local/lib/gcc-lib/sun4/2.3.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix t.cc /tmp/cca16791.i GNU CPP version 2.3.2 (sparc) /usr/local/lib/gcc-lib/sun4/2.3.2/cc1plus /tmp/cca16791.i -quiet -dumpbase t.cc -version -o /tmp/cca16791.s GNU C++ version 2.3.2 (sparc) compiled by GNU C version 2.3.2. In file included from /usr/local/lib/g++-include/iostream.h:24, from /usr/local/lib/g++-include/stream.h:7, from /usr/local/lib/g++-include/String.h:26, from t.cc:2: /usr/local/lib/g++-include/streambuf.h:94: `append' redeclared as different kind of symbol int.List.h:87: previous declaration of `class intList append (class intList&, class intList&)' I regard this as either a bug in libg++ (namespace) or a bug in g++. Klamer PS There is an easy workaround: reverse order of including files. -- Klamer Schutte Tel: +31-53-892778 Fax: +31-53-340045 Faculty of electrical engineering -- University of Twente, The Netherlands preferred: klamer@mi.el.utwente.nl SMTP: klamer@utelmi01.el.utwente.nl
Re: bug in g++ 2.3.2 or libg++ 2.3
Author: bothner
Date: Tue, 15 Dec 1992 05:21
Date: Tue, 15 Dec 1992 05:21
12 lines
1227 bytes
1227 bytes
> In file included from /usr/local/lib/g++-include/iostream.h:24, from /usr/local/ lib/g++-include/stream.h:7, from /usr/local/lib/g++-include/String.h:26, from t. cc:2: > /usr/local/lib/g++-include/streambuf.h:94: `append' redeclared as different kind of symbol > int.List.h:87: previous declaration of `class intList append (class intList&, class intList&)' Since the former definition of append is non-standard, and only defined in "compatibily-mode" for the old stream.h, I suggest replacing #include <stream.h> by #include <iostream.h> in String.h (and most other places). I don't know what will break. I'll find out for the next release ... --Per Bothner Cygnus Support bothner@cygnus.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads