News for hackers. Stuff that matters.
Re:How to dismantle a compiler bomb by kllrnohj on Friday March 09, 2018 @08:22PM (#16556545)
Spec defines any remaining elements to be initialized to 0.

You can even do sparse initialization if we're talking C99 here, like so:

int array[] = {1, 2, 3, [99] = -1}

And you'll get an array of length 100 {1, 2, 3, 0, 0, 0, ..., 0, -1}

Any missing initialized element is always 0 if initialization is done at all, though.

There are no comments on this comment yet.