public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: volker.reichenberger@iwr.uni-heidelberg.de To: gcc-gnats@gcc.gnu.org Subject: c++/3400: doesn't compile simple hierarchy with overlaoding Date: Mon, 25 Jun 2001 04:16:00 -0000 [thread overview] Message-ID: <20010625110648.30817.qmail@sourceware.cygnus.com> (raw) >Number: 3400 >Category: c++ >Synopsis: doesn't compile simple hierarchy with overlaoding >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Jun 25 04:16:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Volker Reichenberger >Release: gcc version 2.95.2 19991024 (release) >Organization: >Environment: SuSe Linux 7.2 on IBM Thinkpad A21p >Description: When trying to compile the program class A {public: void a() {};};class B: public A {public: void a(int n) {};};int main(void){ B b; b.a(); return 0;} I get the error message: test.cc: In function `int main()': test.cc:15: no matching function for call to `B::a ()' test.cc:8: candidates are: void B::a(int) I believe the code is correct (so do all my colleagues). Changing the method name to 'b()' (or anything else) fixes the problem. The code snippet does not exhibit good programming style, but nonetheless it seems to be correct. C++ books in my reach gave no help on the subject. >How-To-Repeat: Compile code with g++ >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2001-06-25 4:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-06-25 4:16 volker.reichenberger [this message] 2001-06-26 1:16 Artem Khodush 2001-06-26 5:26 lerdsuwa
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=20010625110648.30817.qmail@sourceware.cygnus.com \ --to=volker.reichenberger@iwr.uni-heidelberg.de \ --cc=gcc-gnats@gcc.gnu.org \ /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: linkBe 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).