Subject: Re: bug#11675: stty bad C semantics

From: Paul Eggert <[email-masked]>
Date: Mon, 11 Jun 2012 13:29:08 -0700

This area is a bit of a mess in the standard, but I think
Edward Schwartz is right that initializers of auto variables
are not guaranteed to clear padding.

As I understand it under Eric Blake's interpretation, a
complete initializer for an auto variable is not guaranteed
to clear the padding, but an incomplete initializer is
guaranteed to do so.  This would be pretty strange.
I think Edward's interpretation of the incomplete-initializer
wording is more likely to be the correct one: namely, that
missing initializers are treated as if they were zero.

Even if the standard was intended to clear the padding,
clearly in practice we have an implementation that doesn't
do so, and it no doubt performs better that way, so I'd say
something like Edward's patch is advisable.