2 // g++ 1.36.1 bug 900121_05
4 // g++ allows unions to have base types (i.e. to be "derived") and it allows
5 // other types to have unions as base types. Both cases are illegal.
7 // g++ curently does not detect such errors.
9 // Cfront 2.0 passes this test.
11 // keywords: unions, inheritance
17 union u0 : public s0 { /* { dg-error "" } union has base class */
27 struct s1 : public u1 { /* { dg-error "" } base class is a union */
31 int main () { return 0; }