[Bug c++/57327] 'derived' is an ambiguous base class of 'base' diagnostic is backwards

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun May 19 10:41:00 GMT 2013


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|'derived' is an ambiguous   |'derived' is an ambiguous
                   |base class of 'base'        |base class of 'base'
                   |diagnostic is bacwards      |diagnostic is backwards

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks, Paolo.  I've just realised the first line of the test case is missing,
sorry.

Here's a simpler form anyway:

template<class T>
struct A {};

template<class T>
void f(A<T>&) {}

struct B : A<long> {};

struct C : A<char> {};

struct D : B, C {};

int main()
{
  D d;
  f(d);
}

t.cc:16:6: note:   ‘D’ is an ambiguous base class of ‘A<T>’


More information about the Gcc-bugs mailing list