[gnu.g++.bug] Error message far away from error

kenny@m.cs.uiuc.edu (01/19/90)

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 `('