1 /* Tests for the "Initializer entry defined twice" warning. */
3 /* Initializing a struct field twice should trigger the warning. */
9 static struct normal struct_error
= {
14 /* Initializing two different fields of a union should trigger the warning. */
24 static struct has_union union_error
= {
31 /* Empty structures can make two fields have the same offset in a struct.
32 * Initializing both should not trigger the warning. */
40 static struct same_offset not_an_error
= {
45 * check-name: Initializer entry defined twice
48 initializer-entry-defined-twice.c:10:10: warning: Initializer entry defined twice
49 initializer-entry-defined-twice.c:11:10: also defined here
50 initializer-entry-defined-twice.c:26:18: warning: Initializer entry defined twice
51 initializer-entry-defined-twice.c:27:18: also defined here