Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!kenny From: kenny@m.cs.uiuc.edu Newsgroups: gnu.g++.bug Subject: Error message far away from error Message-ID: <53300015@m.cs.uiuc.edu> Date: 19 Jan 90 01:49:14 GMT Lines: 48 Nf-ID: #N:m.cs.uiuc.edu:53300015:000:1427 Nf-From: m.cs.uiuc.edu!kenny Jan 18 14:08:00 1990 Compiler: g++ 1.36.1 Machine: Sun 3/50 running OS 4.0 Severity: low [please follow up by email as I am not a subscriber to bug-g++] The following code produces an error message at a line far removed from the actual error, making the bug incredibly difficult to find. I just spent about four hours extracting this from a larger file, trying to isolate the error. I enclose the source file and the result of `g++ -c -v'. Sorry, my site doesn't have 1.36.3 installed yet. Kevin KE9TV ---------- beginning of file `bug.cc' ---------- class beth; class aleph { beth& parent; public: aleph (beth& owner) : parent (owner) {}; }; class beth { public: aleph a; beth (); beth (beth&) (); // The () on this line shouldn't have been here }; beth::beth () : a (*this) { ; // but the compiler says that the error is here.... }; ---------- end of file `bug.cc' ---------- % g++ -v -c bug.cc gcc version 1.36.1 (based on GCC 1.36) /home/klin/kenny/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Dmc68020 bug.cc /usr/tmp/cca11025.cpp GNU CPP version 1.36 /home/klin/kenny/lib/gcc-cc1plus /usr/tmp/cca11025.cpp -quiet -dumpbase bug.cc -version -o /usr/tmp/cca11025.s GNU C++ version 1.36.1 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36. default target switches: -m68020 -mc68020 -mbitfield bug.cc:20: parse error before `('