This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14790] C++: ambigous overload compile failure - new case different from 1675


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]