Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Everything I wish I knew when learning C. Parent comment
> The type of the entity to be initialized shall be an array of unknown size or a complete object type that is not a variable length array type.
Curiously, C23 actually seems to break the O(1) rule, by allowing VLAs to be initialized with an empty initializer:
int arr[n] = {};
There are no comments on this comment yet.
> The type of the entity to be initialized shall be an array of unknown size or a complete object type that is not a variable length array type.
Curiously, C23 actually seems to break the O(1) rule, by allowing VLAs to be initialized with an empty initializer:
GCC generates a memset call (https://godbolt.org/z/5v31bKs5a) to fill the array with zeros.