[comp.lang.c++] int nlegs

mat@mole-end.UUCP (Mark A Terribile) (10/24/90)

Today I discovered that I had made an error in a header file and the
compiler (Sun's 2.0 release) had not caught it.  I had meant to
type a member declaration of the form

	int nlegs() const;

but instead typed

	int nlegs() const();

I am at a loss for what legal declaration (remember, this is in a class
header) this might represent.  I don't think it does because I noticed this
when I went to move the function into a base class.  I looked at it, spotted
the error, and decided to put the correct declaration (virtual) in the
base class to see what sort of hiding message I might get.  I got none!

Can someone tell me if there is a bug and this illegal, or if it's legal
with a legal interpretation and the compiler failed to warn me about a
hidden name?
-- 

 (This man's opinions are his own.)
 From mole-end				Mark Terribile