This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static array size


YH writes:
 > 
 >   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 ....
 > 
 > }

This question should have been addresses to gcc-help@gcc.gnu.org.

Please RTFM, Section 5.13: Arrays of Variable Length
==============================..
......                        

.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]