GNU Compiler bug ?
Martin v. Loewis
martin@mira.isdn.cs.tu-berlin.de
Sat Jul 31 23:33:00 GMT 1999
> using GNU gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) on a
> Sparc with Solaris 2.7 and Rogue Wave Tools.h++ v0707 UNIX there
> appeared a problem that seems to be a bug. It is reported as 'parse
> error' but I do not find an error in the code nor a matching restriction
> in the GNU manual.
Thanks for your bug report. The problem is with the line
RWbostream(getStreambuf()) << size;
g++ treats "RWbostream(getStreambuf())" as a declaration, and is then
surprised about "<<". The work-around is to write
(RWbostream(getStreambuf())) << size;
With this change, g++ reports
tmp.cpp:1439: type `RWbostream' is not yet defined
which indicates a real error in the program.
Hope this helps,
Martin
More information about the Gcc-bugs
mailing list