aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c99-arraydecl-4.c
blob: f8cad3b94299820c91088201fbae6d50b7624800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-std=c99 -pedantic-errors" } */

void fo(char buf[static]);	/* { dg-error "'static' may not be used without an array size" } */
void fo(char buf[static]) { }	/* { dg-error "'static' may not be used without an array size" } */

void fu(char buf[static *]);	/* { dg-error "'static' may not be used with an unspecified variable length array size" } */
void fu(char buf[static *]) { }	/* { dg-error "'static' may not be used with an unspecified variable length array size" } */

void fe(int n, char buf[static n]);
void fe(int n, char buf[static *]) { }	/* { dg-error "'static' may not be used with an unspecified variable length array size" } */

void fa(int *n, char buf[static *n]);
void fa(int *n, char buf[static *n]) { }