🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #382

bug in g++ 2.3.2 or libg++ 2.3

#382
From: Klamer Schutte
Date: Mon, 14 Dec 1992 21:16
32 lines
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
Technical Details
Message-ID: <klamer.724367815@mi.el.utwente.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!mi.el.utwente.NL!klamer

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!mi.el.utwente.NL!klamer
From: klamer@mi.el.utwente.NL (Klamer Schutte)
Subject: bug in g++ 2.3.2 or libg++ 2.3
Message-ID: <klamer.724367815@mi.el.utwente.nl>
Keywords: genclass List
Sender: gnulists@ai.mit.edu
Organization: University of Twente, BSC-El
Distribution: gnu
Date: Mon, 14 Dec 1992 21:16:55 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 33