[Bug c++/27775] incorrect "ambiguous" error message with multiple inheritance and nested class.

2021-07-26 Thread rnewman at compubrite dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27775

--- Comment #5 from Rich Newman  ---
(In reply to Manuel López-Ibáñez from comment #4)

> Clang 3.0 also reject this, so I am not sure whether is actually valid, but
> the repeated messages are suspicious.
> 

EDG accepts it, and I can see nothing wrong with the code according to the
standards.


The following versions of GCC also reject it with substantially similar error
messages:

10.1.0
11.1.0
5.4.0
6.3.0
7.1.0
7.4.0
8.1.0
8.3.0
9.1.0
9.2.0

[Bug c++/27775] incorrect "ambiguous" error message with multiple inheritance and nested class.

2012-01-28 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27775

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #4 from Manuel López-Ibáñez  2012-01-28 
20:04:05 UTC ---
Also confirmed with GCC 4.7 rev 180166.

Clang 3.0 also reject this, so I am not sure whether is actually valid, but the
repeated messages are suspicious.

/tmp/webcompile/_9463_0.cc:10:14: error: member 'B' found in multiple base
classes of different types
void foo(B b);
 ^
/tmp/webcompile/_9463_0.cc:3:12: note: member found by ambiguous name lookup
struct B
   ^
/tmp/webcompile/_9463_0.cc:3:12: note: member found by ambiguous name lookup
/tmp/webcompile/_9463_0.cc:11:14: error: member 'B' found in multiple base
classes of different types
void bar(B* pb);
 ^
/tmp/webcompile/_9463_0.cc:3:12: note: member found by ambiguous name lookup
struct B
   ^
/tmp/webcompile/_9463_0.cc:3:12: note: member found by ambiguous name lookup
2 errors generated.


[Bug c++/27775] incorrect "ambiguous" error message with multiple inheritance and nested class.

2012-01-27 Thread rnewman at compubrite dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27775

Rich Newman  changed:

   What|Removed |Added

Version|4.0.0   |4.5.1
  Known to fail||4.3.0, 4.3.4, 4.4.4, 4.5.1

--- Comment #3 from Rich Newman  2012-01-27 
17:12:13 UTC ---
Bug still in version 4.3.4:

$ g++ -c bug27775.cc
bug27775.cc:11: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:11: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:11: error: 'B' has not been declared
bug27775.cc:12: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:12: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:12: error: 'B' has not been declared
$ g++ -dumpversion
4.3.4

Also in version 4.4.4:
$ g++ -c bug27775.cc
bug27775.cc:11: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:11: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:11: error: 'B' has not been declared
bug27775.cc:12: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:12: error: reference to 'B' is ambiguous
bug27775.cc:5: error: candidates are: struct A::B
bug27775.cc:5: error: struct A::B
bug27775.cc:12: error: 'B' has not been declared
$ g++ -dumpversion
4.4.4
$

Also in 4.5.1:

$ g++ -c bug27775.cc
bug27775.cc:11:14: error: reference to 'B' is ambiguous
bug27775.cc:5:5: error: candidates are: struct A::B A::B::B
bug27775.cc:5:5: error: struct A::B
bug27775.cc:11:14: error: 'B' has not been declared
bug27775.cc:12:14: error: reference to 'B' is ambiguous
bug27775.cc:5:5: error: candidates are: struct A::B A::B::B
bug27775.cc:5:5: error: struct A::B
bug27775.cc:12:14: error: 'B' has not been declared
$ g++ -dumpversion
4.5.1


[Bug c++/27775] incorrect "ambiguous" error message with multiple inheritance and nested class.

2008-08-10 Thread kristian dot spangsege at gmail dot com


--- Comment #2 from kristian dot spangsege at gmail dot com  2008-08-10 
09:49 ---
I just confirmed this bug in GCC 4.3.0.


-- 


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



[Bug c++/27775] incorrect "ambiguous" error message with multiple inheritance and nested class.

2006-08-06 Thread bangerth at dealii dot org


--- Comment #1 from bangerth at dealii dot org  2006-08-06 22:19 ---
Confirmed. To make things worse, the diagnostic is really longish
right now as well:

g/x> c++ -c x.cc
x.cc:10: error: reference to 'B' is ambiguous
x.cc:4: error: candidates are: struct A::B
x.cc:4: error: struct A::B
x.cc:10: error: reference to 'B' is ambiguous
x.cc:4: error: candidates are: struct A::B
x.cc:4: error: struct A::B
x.cc:10: error: 'B' has not been declared
x.cc:11: error: reference to 'B' is ambiguous
x.cc:4: error: candidates are: struct A::B
x.cc:4: error: struct A::B
x.cc:11: error: reference to 'B' is ambiguous
x.cc:4: error: candidates are: struct A::B
x.cc:4: error: struct A::B
x.cc:11: error: 'B' has not been declared

The 'is ambiguous' message is apparently printed twice, and the 'has not 
been declared' message is, and has long been, bogus...

W.


-- 

bangerth at dealii dot org changed:

   What|Removed |Added

 CC||bangerth at dealii dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-08-06 22:19:48
   date||


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