LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / Wdesignated-init-2.c
blobd5edfba64c92df65201faee362e478fa12ffc063
1 /* PR c/59855 */
2 /* { dg-do compile } */
3 /* { dg-options "-std=gnu11" } */
5 struct S {
6 int a;
7 union {
8 int b;
9 int c;
11 } __attribute__((designated_init));
13 struct S s1 = { .a = 0, .b = 0 };
14 struct S s2 = { 0, 0 }; /* { dg-warning "(positional|near initialization)" } */
15 struct S s3 = { .a = 5, 0 }; /* { dg-warning "(positional|near initialization)" } */