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

From: Andreas Schwab <[email-masked]>
Date: Mon, 11 Jun 2012 22:28:49 +0200

Eric Blake <[email-masked]> writes:

> And while there is no way to zero out padding bits by direct assignment,
> I think we _are_ guaranteed that padding bits are zero when doing the
> same initialization as static storage duration if we did not call out
> all the named members.

I think the standard is very clear about the state of padding bytes
[6.2.6.1#6]:

    When a value is stored in an object of structure or union type,
    including in a member object, the bytes of the object representation
    that correspond to any padding bytes take unspecified values.

(6.7.8#10 says nothing about the initial value of any padding bytes.)

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."