2 /* { dg-do compile } */
3 /* { dg-options "-Wc++-compat -Woverride-init" } */
4 /* { dg-prune-output ".*near initialization for.*" } */
16 { B
} /* { dg-warning "5:enum conversion in initialization is invalid in C\[+\]\[+\]" } */
31 union U u
= { .i
= ++i
, .l
= 1 }; /* { dg-warning "32:initialized field with side-effects overwritten" } */
32 union U u2
= { .i
= 1, .l
= 3 }; /* { dg-warning "31:initialized field overwritten" } */
33 int a
[] = { i
++, [0] = 1 }; /* { dg-warning "26:initialized field with side-effects overwritten" } */
34 int a2
[] = { i
, [0] = 1 }; /* { dg-warning "25:initialized field overwritten" } */
35 struct R r
= { 1, .a
= 2 }; /* { dg-warning "26:initialized field overwritten" } */
36 struct R r2
= { ++i
, .a
= 2 }; /* { dg-warning "29:initialized field with side-effects overwritten" } */