Previous Table of Contents "New C Standard" commentary
569 The representations of all types are unspecified except as stated in this subclause.
570 Except for bit-fields, objects are composed of contiguous sequences of one or more bytes, the number, order, and encoding of which are either explicitly specified or implementation-defined.
Values stored in unsigned bit-fields and objects of type
Values stored in non-bit-field objects of any other object type
consist of n ×
The value may be copied into an object of type
574 the resulting set of bytes is called the object representation of the value.
575 Values stored in bit-fields consist of m bits, where m is the size specified for the bit-field.
576 The object representation is the set of m bits the bit-field comprises in the addressable storage unit holding it.
577 Two values (other than NaNs) with the same object representation compare equal, but values that compare equal may have different object representations.
578 Certain object representations need not represent a value of the object type.
579 If the stored value of an object has such a representation and is read by an lvalue expression that does not have character type, the behavior is undefined.
580 If such a representation is produced by a side effect that modifies all or any part of the object by an lvalue expression that does not have character type, the behavior is undefined.41)
581 Such a representation is called a trap representation.
582 40) A positional representation for integers that uses the binary digits 0 and 1, in which the values represented by successive bits are additive, begin with 1, and are multiplied by successive integral powers of 2, except perhaps the bit with the highest position.
583 (Adapted from the American National Dictionary for Information Processing Systems.)
A byte contains
585 41) Thus, an automatic variable can be initialized to a trap representation without causing undefined behavior, but the value of the variable cannot be used until a proper value is stored in it.
586 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.42)
When a value is stored in a member of an object of union type, the
bytes of the object representation that do not correspond to that
member but do correspond to other members take unspecified
590 Where an operator is applied to a value that has more than one object representation, which object representation is used shall not affect the value of the result.43)
591 Where a value is stored in an object using a type that has more than one object representation for that value, it is unspecified which representation is used, but a trap representation shall not be generated.
592 Forward references: declarations (6.7), expressions (6.5), lvalues, arrays, and function designators (184.108.40.206).
Created at: 2008-01-30 02:39:40
The text from WG14/N1256 is copyright © ISO
Created at: 2008-01-30 02:39:40 The text from WG14/N1256 is copyright © ISO