public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "igodard at pacbell dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/20576] New: poor diagnostic Date: Mon, 21 Mar 2005 12:26:00 -0000 [thread overview] Message-ID: <20050321122530.20576.igodard@pacbell.net> (raw) In: struct bottom {}; template<typename v, typename next> struct node: public next { v val; }; enum a {b, c}; enum x{y, z}; struct foo : public node<a, node<x, bottom> > {}; template<typename T, typename U> void bar(node<T, U>&) {} int main() { foo f; bar(f); return 0; } you get: ~/ootbc/members/src$ g++ foo.cc foo.cc: In function `int main()': foo.cc:10: error: no matching function for call to `bar(foo&)' Actually, there is a matching function, but the call is ambiguous because there are two matching base classes. The diagnostic should say so and identify the matching bases. This is reported correctly by other ambiguous calls where two different functions are matches to the argument set. In this case one function has two different matches, but the user's need in the diagnostic is the same: show what the compiler found. Ivan -- Summary: poor diagnostic Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20576
next reply other threads:[~2005-03-21 12:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-03-21 12:26 igodard at pacbell dot net [this message] 2005-03-21 12:39 ` [Bug c++/20576] " igodard at pacbell dot net 2005-03-21 22:05 ` bangerth at dealii dot org 2005-06-20 3:01 ` pinskia at gcc dot gnu dot org
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=20050321122530.20576.igodard@pacbell.net \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).