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; 7+ 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] 7+ messages in thread

* [Bug c++/25994] Using declarations and base function overloading
  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 ` pinskia at gcc dot gnu dot org
  2006-01-27 12:55 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-27 12:53 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-27 12:53 -------
In 4.0, I get a different error message:
t.cc:16: error: using declaration ‘using B2::f’ conflicts with a previous using
declaration


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/25994] Using declarations and base function overloading
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-27 12:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-01-27 12:55 -------
Hmm, This might be because we still have some ARM (pre-standard) based using
semantics implemented and not the standard C++ ones.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/25994] Using declarations and base function overloading
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-27 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-01-27 13:40 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|sparc-sun-solaris2.5.1      |
   GCC host triplet|i386-pc-mingw32             |
 GCC target triplet|powerpc-wrs-vxworks         |
           Keywords|                            |rejects-valid
      Known to fail|                            |3.3.6 3.4.4 4.2.0
   Last reconfirmed|0000-00-00 00:00:00         |2006-01-27 13:40:58
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/25994] Using declarations and base function overloading
  2006-01-27 12:51 [Bug c++/25994] New: Using declarations and base function overloading wolfgang dot roehrl at gi-de dot com
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-17 22:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo dot carlini at oracle dot com  2010-01-17 22:47 -------
*** Bug 42784 has been marked as a duplicate of this bug. ***


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |max at e-soft dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/25994] Using declarations and base function overloading
  2006-01-27 12:51 [Bug c++/25994] New: Using declarations and base function overloading wolfgang dot roehrl at gi-de dot com
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: fabien dot chene at gmail dot com @ 2010-05-09 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fabien dot chene at gmail dot com  2010-05-09 22:09 -------
mine...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/25994] Using declarations and base function overloading
  2006-01-27 12:51 [Bug c++/25994] New: Using declarations and base function overloading wolfgang dot roehrl at gi-de dot com
                   ` (4 preceding siblings ...)
  2010-05-09 22:09 ` fabien dot chene at gmail dot com
@ 2010-06-06 17:52 ` fabien at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: fabien at gcc dot gnu dot org @ 2010-06-06 17:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

fabien at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fabien at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-01-27 13:40:58         |2010-06-06 17:52:26
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25994


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-06 17:52 UTC | newest]

Thread overview: 7+ 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

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