4 ms·
> VLA were not removed. They were made optional in C11, which for real-world purposes makes puts it on the same level as a compiler-specific language extension
by flohofwoe 3y ago
> VLA were not removed.
They were made optional in C11, which for real-world purposes makes puts it on the same level as a compiler-specific language extension. For instance MSVC will (most likely) never support VLAs:
https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...
(specifically: https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/#variable-length-arrays https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...)
- uecker 3y agoThe difference is that if there are there, you get consistent behavior across all compilers that support them. MSVC was essentially stuck with pre-C99 for a long time. So nobody in their right mind would use it for C programming if he had a choice. Now they are catching up. Let's see how this goes. We made variably modified types mandatory in C23. I hope we make VLAs mandatory again in the next revision.