This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Confusing error message
- To: egcs at cygnus dot com
- Subject: Confusing error message
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Tue, 15 Dec 1998 14:59:51 +0100 (CET)
Hi,
I ran into the following confusing error message:
-------------------------------------------------------------------------------
class A;
bool A::foo(void)
{
return true;
}
-------------------------------------------------------------------------------
gives:
errmsg.cc:4: no `bool A::foo()' member function declared in class `A'
while the real problem is that I didn't include the correct header file
(but another header file that only contained a forward declaration).
In a large program this can be quite confusing, wouldn't it be better to say:
errmsg.cc:4: class `A' is only a forward declaration.
Or something like that?
--
Carlo Wood <carlo@runaway.xs4all.nl>