]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/c2x-complit-6.c
23a0bb6420bbd6cc8244f5ac7118ae8aedfb1082
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / c2x-complit-6.c
1 /* Test C2x storage class specifiers in compound literals diagnosed with
2 -Wc11-c2x-compat. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c2x -Wc11-c2x-compat" } */
5
6 int *ps = &(static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */
7 int ss = sizeof (static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */