1 /* Test for warnings for overriding designated initializers:
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-Wextra" } */
7 struct s
{ int a
; int b
; int c
; };
8 union u
{ char a
; long long b
; };
13 .a
= 3, /* { dg-warning "initialized field overwritten" } */
14 4, /* { dg-warning "initialized field overwritten" } */
20 .b
= 2, /* { dg-warning "initialized field overwritten" } */
21 .a
= 3 }; /* { dg-warning "initialized field overwritten" } */
26 [0] = 3, /* { dg-warning "initialized field overwritten" } */