1 /* PR c/44772 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-Wc++-compat" } */ 4 5 typedef enum { E1, E2 } E; 6 7 typedef struct 8 { 9 E e; 10 union 11 { 12 int i; 13 char *c; 14 }; /* { dg-bogus "as both field and typedef name" } */ 15 } S; 16 17 S s; 18 19 typedef int T; 20 21 struct U 22 { 23 T t; 24 union { int i; }; /* { dg-bogus "as both field and typedef name" } */ 25 }; 26