1 /* Test C11 does not support empty initializers. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -pedantic-errors" } */
6 struct s s = {}; /* { dg-error "empty initializer" } */
7 int x = {}; /* { dg-error "empty initializer" } */
8 float y = {}; /* { dg-error "empty initializer" } */
9 void *p = {}; /* { dg-error "empty initializer" } */
10 union u { int a; long b; };
11 union u z = {}; /* { dg-error "empty initializer" } */
12 int aa[2] = {}; /* { dg-error "empty initializer" } */
17 int vla[a] = {}; /* { dg-error "empty initializer" } */
18 struct s as = {}; /* { dg-error "empty initializer" } */
19 int ax = {}; /* { dg-error "empty initializer" } */
20 float ay = {}; /* { dg-error "empty initializer" } */
21 void *ap = {}; /* { dg-error "empty initializer" } */
22 union u az = {}; /* { dg-error "empty initializer" } */
23 int aaa[2] = {}; /* { dg-error "empty initializer" } */
24 int t = (int) {}; /* { dg-error "empty initializer" } */