g++ fails on qualified name in multiple inheritance
Bug #424838 reported by
Michael Tsang
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Fix Released
|
Low
|
|||
gcc-4.4 (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
struct base{
int x;
};
struct aa:public base{
};
struct ab:public base{
};
struct ba:public aa,ab{
};
struct bb:public aa,ab{
};
struct final:public ba,bb{
};
int main(){
final obj;
}
/*
Expected behaviour:
The member x accessed by the path final::ba::aa::x in main()::obj is changed to 5
Actual behaviour:
g++ fails to compile this program generating:
test.cpp: In function ‘int main()’:
test.cpp:24: error: ‘aa’ is an ambiguous base of ‘final’
*/
Changed in gcc: | |
status: | Unknown → Fix Released |
Changed in gcc: | |
importance: | Unknown → Low |
To post a comment you must log in.
See the upstream bug report, this is intended behaviour afaics.