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

Zero-length arrays, used to implement a variable-sized structure with header: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html. Although apparently it’s a GCC extension, which I didn’t realize until now.


C99 made it official with "type foo[];" syntax. Better than using "type foo[1];" and potentially adding unnecessary padding.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: