public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wolfgang dot roehrl at gi-de dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/25994] New: Using declarations and base function overloading Date: Fri, 27 Jan 2006 12:51:00 -0000 [thread overview] Message-ID: <bug-25994-7154@http.gcc.gnu.org/bugzilla/> (raw) Dear all, I would like to post a bug report for the GNU C/C++ compiler 3.3-e500. We use the compiler to generate code for a PowerPC processor. Used invokation line for the GNU C++ compiler: ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig -fmerge-templates -mmultiple -mno-string -mstrict-align -O3 -fno-exceptions -fno-rtti -fno-builtin-printf -I<different include paths> -D<differen #define's> X.CPP -oX.O // file X.CPP struct B1 { void f (char); void f (double); }; struct B2 { void f (int); void f (double); // <--- line 10 }; struct D : public B1, public B2 { using B1::f; using B2::f; void g () { f ('a'); // should call B1::f(char) f (33); // should call B2::f(int) } }; The compiler gives the following error message: X.CPP:10: error: `void B2::f(double)' and `void B1::f(double)' cannot be overloaded I think this is not standard conforming. See 7.3.3/12: "[ Note: two using declarations may introduce functions with the same name and the same parameter types. If, for a call to an unqualified function name, function overload resolution selects the functions introduced by such using declarations, the function call is illformed. ]" Kind regards W. Roehrl -- Summary: Using declarations and base function overloading Product: gcc Version: 3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wolfgang dot roehrl at gi-de dot com GCC build triplet: sparc-sun-solaris2.5.1 GCC host triplet: i386-pc-mingw32 GCC target triplet: powerpc-wrs-vxworks http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994
next reply other threads:[~2006-01-27 12:51 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-01-27 12:51 wolfgang dot roehrl at gi-de dot com [this message] 2006-01-27 12:53 ` [Bug c++/25994] " pinskia at gcc dot gnu dot org 2006-01-27 12:55 ` pinskia at gcc dot gnu dot org 2006-01-27 13:41 ` rguenth at gcc dot gnu dot org 2010-01-17 22:48 ` paolo dot carlini at oracle dot com 2010-05-09 22:09 ` fabien dot chene at gmail dot com 2010-06-06 17:52 ` fabien 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=bug-25994-7154@http.gcc.gnu.org/bugzilla/ \ --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).