Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / gnu23-empty-init-2.c
blobf73d018c35a6636cf9d077362ce99aeff338f5cb
1 /* Test C23 support for empty initializers: invalid use cases with GNU
2 extensions. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu23" } */
6 void
7 f (int a)
9 /* Make sure a non-braced initializer for a VLA-in-struct is still not
10 allowed. */
11 struct s { int x[a]; };
12 struct s b;
13 for (int i = 0; i < a; i++)
14 b.x[i] = 0;
15 struct s c = b; /* { dg-error "variable-sized object may not be initialized except with an empty initializer" } */