Hacker News new | ask | show | jobs
by polyphonicist 2309 days ago
Why is VLA useless?

Why was it added to C99?

1 comments

Because even C isn't free from the occasional misfeature slipping into the standard. VLAs come with a lot of caveats (e.g. available stack size being limited and opaque, no sizeof() support, etc).

VLAs were made optional in C11, so it's better not to use them at all for portable code.