https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299
--- Comment #5 from Jonathan Wakely ---
[over.match.oper] says "c++" does name lookup for operator++ using qualified
lookup for C::operator++ and unqualified lookup for "operator++" (and the
built-in candidates, which aren't valid here). If name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299
--- Comment #4 from Im ieee ---
(In reply to Jonathan Wakely from comment #3)
> My initial reaction is that GCC and ICC/EDG are correct. Name lookup is
> performed for "operator++" and if a name is found in two different base
> classes the result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299
--- Comment #3 from Jonathan Wakely ---
My initial reaction is that GCC and ICC/EDG are correct. Name lookup is
performed for "operator++" and if a name is found in two different base classes
the result is ambiguous. The different argument lists
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299
--- Comment #2 from Im ieee ---
I have a mistake, ICC also rejects the code:
"C::operator++" (ambiguous by inheritance)
operand types are: C ++
c++;
^
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299
--- Comment #1 from Jonathan Wakely ---
EDG rejects it for the same reason as GCC:
"c.cc", line 20: error: more than one operator "++" matches these operands:
"C::operator++" (ambiguous by inheritance)
operand types are: