This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Variable length array
- To: egcs-bugs at cygnus dot com
- Subject: Variable length array
- From: Luigi Pilo <L dot Pilo at damtp dot cam dot ac dot uk>
- Date: Mon, 3 Aug 1998 14:46:17 +0100 (BST)
Trying to compile the following with gcc version 2.7.2.1 or egcs-1.0.3
int main()
{
int dim;
dim = 3;
/* GNU variable length array */
int gnu_array[dim];
return 0;
}
I get:
test.c: In function `main':
test.c:7: parse error before `int' .
The problem disappear replacing "int dim; dim = 3;" by
"int dim = 3;" .
Luigi Pilo