This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: declaration of array
- From: LLeweLLyn Reese <llewelly at lifesupport dot shutdown dot com>
- To: Baraclese <webmaster at baraclese dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 27 Dec 2002 17:42:15 -0800
- Subject: Re: declaration of array
- References: <3E0CF4E3.3060006@baraclese.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Baraclese <webmaster@baraclese.com> writes:
[snip]
> void a(const int b)
> {
> int values[b]; // b is not known at compile time
> }
>
> my question is, is this ansi c++ code or is it a feature of gcc?
An extension. See:
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Variable-Length.html#Variable%20Length
[snip]