summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c11-static-assert-4.c
blob: ddab440ff48c9fb8a154b13c76e1d1ba271bfe6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Test C11 static assertions.  More invalid assertions.  */
/* { dg-do compile } */
/* { dg-options "-std=c11 -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" } */
{
}