This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Variable length array
- To: L dot Pilo at damtp dot cam dot ac dot uk
- Subject: Re: Variable length array
- From: Alan Lehotsky <lehotsky at tiac dot net>
- Date: Mon, 3 Aug 1998 10:46:43 -0400 (EDT)
- CC: egcs-bugs at cygnus dot com
> 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;
> }
>
That's not legal C. You can't have declarations in a block
after executable statements. [It would be legal C++....]
-- Al