by Joker_vD · 2y ago · 0 comments
For these reasons, we propose to make variably-modified types
mandatory in C23. VLAs with automatic storage duration remain an optional language
feature due to their higher implementation overhead and security concerns on some
implementations (i.e. when allocated on the stack and not using stack probing).
from N2778 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2778.pdf)> Variable length arrays with automatic storage duration are a conditional feature that implementations need not support
confused
void function(int n) {
int (*arr)[n] = malloc(sizeof(*arr));
}https://en.wikipedia.org/wiki/Variable-length_array#C99
If that phrasing isn't accurate I'm sure they'd appreciate an edit.