Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When did C start accepting non-constants for array size declarations?


Variable-length arrays were added in C99.


I was wondering the same thing. But I can confirm it compiles and runs, though I had to supply a -std=c99 flag to gcc.


Ahhh, useful tip. I've just been using alloca instead...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: