4 ms·
>MSVC stubbornly refuses to add support for variable-length arrays (which AFAIK are required for full C99 support). They were made optional in C11. It was a go
by xeeeeeeeeeeenu 4y ago
>MSVC stubbornly refuses to add support for variable-length arrays (which AFAIK are required for full C99 support).
They were made optional in C11. It was a good decision because it's a dangerous misfeature.
- uecker 4y agoI find them very useful and they often make the code cleaner. A dynamic run-time bound for a buffer can also make the code safer. VLAs are only dangerous when implemented naively (allocated on the stack without stack probing).
- xeeeeeeeeeeenu 4y ago>are only dangerous when implemented naively (allocated on the stack without stack probing). That's how it's implemented in all the major compilers. Anyway, even a hypothetical heap-based implementation would be bad because there's no way to report allocation errors.
- uecker 4y agoGCC has stack probing.