John is right here -- { } isn't valid C -- GCC is fine with it though.

{ 0 } or { NULL } are both extremely widespread terminators, so I
could imagine gcc special casing it for Wmissing-field-initializers.
Furthermore, when you do neglect to set all the fields explicitly, the
unset ones are zeroed out. So, the zero in { 0 } doesn't ever really
apply to any particular field, since they're all set to that value.
It's basically a nice syntax for zeroing stack variables.

_______________________________________________
cgit mailing list
[email protected]
http://hjemli.net/mailman/listinfo/cgit

Reply via email to