aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c2x-complit-6.c
blob: 23a0bb6420bbd6cc8244f5ac7118ae8aedfb1082 (plain)
1
2
3
4
5
6
7
/* Test C2x storage class specifiers in compound literals diagnosed with
   -Wc11-c2x-compat.  */
/* { dg-do compile } */
/* { dg-options "-std=c2x -Wc11-c2x-compat" } */

int *ps = &(static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */
int ss = sizeof (static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */