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] | |
I presume we're talking C here, and gnu C at that. MAX_VAL is not an integral constant expression, so int ary[MAX_VAL] must be a VLA, if it is valid.
C89 disallows both uses, C99 disallows VLAs at file scope, but allows them at function scope. GNU C is similar to C99.
Of course, since GNU C allows dynamic arrays, it does allow this construct, and given that it is allowed, it is perfectly reasonable to ask that the compiler do this efficiently and not actually treat it as dynamic at the implementation level (even if it is dynamic at the semantic level).
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |