public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Carlo Wood <carlo@runaway.xs4all.nl>
To: egcs@cygnus.com
Subject: Confusing error message
Date: Tue, 15 Dec 1998 09:16:00 -0000	[thread overview]
Message-ID: <199812151359.OAA01147@jolan.ppro> (raw)

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>

             reply	other threads:[~1998-12-15  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-15  9:16 Carlo Wood [this message]
1998-12-15 10:11 ` Nathan Sidwell
1999-01-31 23:58   ` Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199812151359.OAA01147@jolan.ppro \
    --to=carlo@runaway.xs4all.nl \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).