Date
2003-04-15.00:00:00
Message id
816

Content

Proposed resolution (April 2003):

Change 6.7.4 [basic.life] bullet 5.3 from

  • the pointer is used as the operand of a static_cast (7.6.1.9 [expr.static.cast]) (except when the conversion is to void*, or to void* and subsequently to char*, or unsigned char*).

to

  • the pointer is used as the operand of a static_cast (7.6.1.9 [expr.static.cast]) (except when the conversion is to void*, or to void* and subsequently to a pointer to byte-character type).

Change 6.7.4 [basic.life] bullet 6.3 from

  • the lvalue is used as the operand of a static_cast (7.6.1.9 [expr.static.cast]) (except when the conversion is ultimately to char& or unsigned char&), or

to

  • the lvalue is used as the operand of a static_cast (7.6.1.9 [expr.static.cast]) (except when the conversion is ultimately to a reference to byte-character type), or

Change the beginning of 6.8 [basic.types] paragraph 2 from

For any object (other than a base-class subobject) of POD type T, whether or not the object holds a valid value of type T, the underlying bytes (6.7.1 [intro.memory]) making up the object can be copied into an array of char or unsigned char.

to

For any object (other than a base-class subobject) of POD type T, whether or not the object holds a valid value of type T, the underlying bytes (6.7.1 [intro.memory]) making up the object can be copied into an array of byte-character type.

Add the indicated text to 6.8.2 [basic.fundamental] paragraph 1:

Objects declared as characters (char) shall be large enough to store any member of the implementation's basic character set. If a character from this set is stored in a character object, the integral value of that character object is equal to the value of the single character literal form of that character. It is implementation-defined whether a char object can hold negative values. Characters can be explicitly declared unsigned or signed. Plain char, signed char, and unsigned char are three distinct types, called the byte-character types. A char, a signed char, and an unsigned char occupy the same amount of storage and have the same alignment requirements (6.8 [basic.types]); that is, they have the same object representation. For byte-character types, all bits of the object representation participate in the value representation. For unsigned byte-character types, all possible bit patterns of the value representation represent numbers. These requirements do not hold for other types. In any particular implementation, a plain char object can take on either the same values as a signed char or an unsigned char; which one is implementation-defined.

Change 7.2.1 [basic.lval] paragraph 15 last bullet from

  • a char or unsigned char type.

to

  • a byte-character type.