public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25994]  New: Using declarations and base function overloading
@ 2006-01-27 12:51 wolfgang dot roehrl at gi-de dot com
  2006-01-27 12:53 ` [Bug c++/25994] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: wolfgang dot roehrl at gi-de dot com @ 2006-01-27 12:51 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <bug-25994-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-01-03 10:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-27 12:51 [Bug c++/25994] New: Using declarations and base function overloading wolfgang dot roehrl at gi-de dot com
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
     [not found] <bug-25994-4@http.gcc.gnu.org/bugzilla/>
2011-11-14 18:00 ` jason at gcc dot gnu.org
2011-11-16  8:31 ` fabien at gcc dot gnu.org
2012-01-03 10:05 ` fabien at gcc dot gnu.org

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).