1 // Bug: g++ has trouble copying anonymous structs. 2 3 typedef struct { int i; } foo; 4 struct A : public foo { 5 struct { int i; } x; 6 }; 7 main()8 int main () 9 { 10 A a; 11 a.i = 5; 12 a.x.i = 42; 13 A b (a); 14 a = b; 15 if (a.i != 5 || a.x.i != 42) 16 return 1; 17 return 0; 18 } 19