[Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice)
shuki_duv at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Aug 4 15:06:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789
Summary: rejects legal, multiple inheritance (inheriting from
same class twice)
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: shuki_duv at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
struct Base {
int b;
Base(int b) : b(b) { }
};
struct Derived : public Base {
Derived(int d) : Base(d) { }
};
struct Final : public Derived, public Base {
Final(int f) : Derived(f), Base(f-1) { }
};
int main()
{
Final f(5);
}
gcc reports this as ambigous, although the ambiguity arises only when trying to
refer to Final via Base.
More information about the Gcc-bugs
mailing list