3 ms·
VLAs were added in C99, but not universally adopted (particularly by embedded systems compilers, for obvious reasons), and then made optional in C11.
by kps 10y ago
VLAs were added in C99, but not universally adopted (particularly by embedded systems compilers, for obvious reasons), and then made optional in C11.
- pantalaimon 10y agoI don't see an obvious reason - that's all information that's available on compile-time, there should be no additional run-time cost - or what are you implying?
- gcp 10y agoVLA allows for run-time size determination, not compile time
- DSMan195276 10y agoYou're completely right, but I think it's worth clarifying that VLA notation in parameter lists, and actual VLAs are two completely different things. The example he showed doesn't actually use a VLA, it just looks like it does.