summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c1x-static-assert-4.c
blob: ebc95f5f906debce6e6cda74613c25743a0b503f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Test C1X static assertions.  More invalid assertions.  */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */

/* Static assertions not valid in old-style parameter declarations
   because declarations there must have declarators.  */

void
f (i)
     int i;
     _Static_assert (1, ""); /* { dg-error "expected" } */
{
}