[Bug c++/16889] New: regression from 2.95.3: ambiguity is not detected
dvv at gcc dot dvv dot org
gcc-bugzilla@gcc.gnu.org
Thu Aug 5 19:30:00 GMT 2004
Ambiguity is not detected in this code:
// start of code
class B {
public:
B* p;
B* f();
virtual ~B();
};
class B1 : virtual public B {
};
class B2 : virtual public B {
};
class B3 : public B {
};
class BB : public B1, public B2, public B3 {
};
#include <iostream>
B*
B::f ()
{
std::cout << this << std::endl;
return this;
}
B::~B()
{
std::cout << this << ".~B()" << std::endl;
}
int
main ()
{
BB b;
b.B1::f();
b.B2::f();
b.B3::f();
b.f();
}
// end of code
2.95.3 correctly rejects this code.
--
Summary: regression from 2.95.3: ambiguity is not detected
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dvv at gcc dot dvv dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16889
More information about the Gcc-bugs
mailing list