This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice)
- From: "shuki_duv at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2003 15:06:56 -0000
- Subject: [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.