2 ms·
Zero-length arrays, used to implement a variable-sized structure with header: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html https://gcc.gnu.org/onlinedocs
by bertr4nd 6y ago
Zero-length arrays, used to implement a variable-sized structure with header: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html. Although apparently it’s a GCC extension, which I didn’t realize until now.
- kevin_thibedeau 6y agoC99 made it official with "type foo[];" syntax. Better than using "type foo[1];" and potentially adding unnecessary padding.