https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
--- Comment #8 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #6)
> EDG still accepts this, but Clang doesn't:
clang started to accept it in clang 12.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
Jonathan Wakely changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
--- Comment #6 from Jonathan Wakely ---
EDG still accepts this, but Clang doesn't:
21146.cc:13:18: error: member 'S' found in multiple base classes of different
types
friend class A;
^
21146.cc:7:8: note: member found by ambig
--- Comment #5 from manu at gcc dot gnu dot org 2009-02-07 20:18 ---
This still fails in GCC 4.4
icc accepts the code in strict mode, so I guess this is rejects-valid.
--
manu at gcc dot gnu dot org changed:
What|Removed |Added
---
--- Comment #4 from manu at gcc dot gnu dot org 2007-11-15 16:30 ---
So, is this a bug or not? Do we know how icc resolves the ambiguity?
--
manu at gcc dot gnu dot org changed:
What|Removed |Added
--
--- Comment #3 from reichelt at gcc dot gnu dot org 2007-04-09 18:32
---
Btw, since GCC 4.1.0 the error message is:
bug.cc:13: error: reference to 'S' is ambiguous
bug.cc:4: error: candidates are: typedef struct S A::S
bug.cc:7: error: struct S
bug.cc:13: error: templat
--- Additional Comments From bangerth at dealii dot org 2005-05-02 18:54
---
What is going wrong is this: the name 'S' may refer to both the local
typedef in the base class 'A' as well as to the global structure '::S'.
If I write either
friend class A< A< ::S>::S>;
or
friend cl
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-21
12:59 ---
3.3.3 gave:
t.cc:13: error: request for member `S' is ambiguous in multiple inheritance
lattice
t.cc:7: error: candidates are: struct S
t.cc:4: error: typedef struct S A::S
t.cc:13: error