MSVC is not a C99 compiler, and does not support variable length arrays.
At https://docs.microsoft.com/en-us/cpp/c-language/ansi-conformance MSVC is documented as conforming to C90.
More Related Contents:
- What is the behavior of integer division?
- Are prototypes required for all functions in C89, C90 or C99?
- What is the difference between C, C99, ANSI C and GNU C?
- Does either ANSI C or ISO C specify what -5 % 10 should be?
- C variable declarations after function heading in definition [duplicate]
- Why was mixing declarations and code forbidden up until C99?
- What’s the difference between “int” and “int_fast16_t”?
- Is there any option to switch between C99 and C11 C standards in Visual Studio?
- Dynamic array allocation on stack in C
- Compiler support of GNU Statement Expression
- Should C compilers immediately free "further unused" memories? [closed]
- What is the difference between ‘asm’, ‘__asm’ and ‘__asm__’?
- func() vs func(void) in C99
- Standard alternative to GCC’s ##__VA_ARGS__ trick?
- How does GCC implement variable-length arrays?
- C99 inline function in .c file
- Recursive declaration of function pointer in C
- What is the official status of C99 support in VS2013?
- Type to use to represent a byte in ANSI (C89/90) C?
- Is it a good idea to use C99 VLA compared to malloc/free?
- Setting std=c99 flag in GCC
- In C99, is f()+g() undefined or merely unspecified?
- Is there a meaningful distinction between freestanding and hosted implementations?
- Is there a GCC keyword to allow structure-reordering?
- How to use compound literals to `fprintf()` multiple formatted numbers with arbitrary bases?
- Printf long long int in C with GCC?
- Why is this VLA (variable-length array) definition unreliable?
- Is there a way to use fopen_s() with GCC or at least create a #define about it?
- Declaring an array of negative length
- Why are compound literals in C modifiable