This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14790] C++: ambigous overload compile failure - new case different from 1675
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Mar 2004 10:49:10 -0000
- Subject: [Bug c++/14790] C++: ambigous overload compile failure - new case different from 1675
- References: <20040330234533.14790.osf@squirrely.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-03-31 10:49 -------
The code is invalid: [10.2]/2 states
The following steps define the result of name lookup in a class scope,
C. First, every declaration for the name in the class and in each of
its base class sub-objects is considered. [...] If the resulting set of
declarations are not all from sub-objects of the same type, or the set
has a nonstatic member and includes members from distinct sub-objects,
there is an ambiguity and the program is ill-formed. Otherwise that set
is the result of the lookup.
Because the name appears in two base classes, the testcase is invalid.
(The fact that the functions in the testcase have different signatures
doesn't matter at all for name resolution!)
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14790