This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Confusing error message


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]