This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: static array size
- From: YH <yh at bizmail dot com dot au>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 24 Apr 2006 21:09:07 +1000
- Subject: Re: static array size
- Reply-to: yh at bizmail dot com dot au
Hello,
Is the following example legal in current GCC compilation for C
program? I thought the static array allocation can only used by a
defined constant such as char buf[MAX_SIZE], where #define MAX_SIZE 10?
void DoSomthing(int size)
{
char buf[size];
...... do something ....
}
Thanks.
Jim