Created on 2012-08-15.00:00:00 last changed 130 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (October, 2012):
Change _N4885_6.7.5.5.4 [basic.stc.dynamic.safety] paragraph 1 as follows:
A traceable pointer object is
...
a sequence of elements in an array of narrow character type (6.8.2 [basic.fundamental]), where the size and alignment of the sequence match those of some object pointer type.
Change 6.8.2 [basic.fundamental] paragraph 1 as follows:
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, collectively called narrow character types. A char, a signed char, and an unsigned char occupy the same amount of storage and have the same alignment requirements (6.7.6 [basic.align]); that is, they have the same object representation. For narrow character types, all bits of the object representation participate in the value representation. For unsigned narrow 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 6.7.6 [basic.align] paragraph 6 as follows:
The alignment requirement of a complete type can be queried using an alignof expression (7.6.2.6 [expr.alignof]). Furthermore, thetypes char, signed char, and unsigned charnarrow character types (6.8.2 [basic.fundamental]) shall have the weakest alignment requirement. [Note: This enables the narrow character types to be used as the underlying type for an aligned memory area (9.12.2 [dcl.align]). —end note]
Change 9.4.3 [dcl.init.string] paragraph 1 as follows:
A char array (whether plain char, signed char, or unsigned char)An array of narrow character type (6.8.2 [basic.fundamental]), char16_t array, char32_t array, or wchar_t array can be initialized by a narrowcharacterstring literal, char16_t string literal, char32_t string literal, or wide string literal, respectively, or by an appropriately-typed string literal enclosed in braces (5.13.5 [lex.string]). Successive characters of the value of the string literal initialize the elements of the array. [Example:
The term character type is used in the Standard without definition. It should be defined; however, the use of the term is divergent between the core and library clauses: in the former, it means narrow character types, while in the latter it includes wchar_t, char16_t, and char32_t, so care must be taken in ensuring that no inadvertent changes are implied.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4375 |
2013-05-03 00:00:00 | admin | set | status: ready -> dr |
2012-11-03 00:00:00 | admin | set | messages: + msg4046 |
2012-11-03 00:00:00 | admin | set | status: open -> ready |
2012-08-15 00:00:00 | admin | create |