Title
Lvalue-to-rvalue conversions of uninitialized char objects
Status
nad
Section
7.3.2 [conv.lval]
Submitter
Alan Stokes

Created on 2007-02-06.00:00:00 last changed 45 months ago

Messages

Date: 2021-02-15.00:00:00

Rationale (February, 2021):

The Standard now clearly specifies the handling of indeterminate values for unsigned char and std::byte types; see 6.7.4 [basic.indet].

Date: 2022-11-20.07:54:16

According to 7.3.2 [conv.lval] paragraph 1, applying the lvalue-to-rvalue conversion to any uninitialized object results in undefined behavior. However, character types are intended to allow any data, including uninitialized objects and padding, to be copied (hence the statements in 6.8.2 [basic.fundamental] paragraph 1 that “For character types, all bits of the object representation participate in the value representation” and in 7.2.1 [basic.lval] paragraph 15 that char and unsigned char types can alias any object). The lvalue-to-rvalue conversion should be permitted on uninitialized objects of character type without evoking undefined behavior.

History
Date User Action Args
2021-02-17 00:00:00adminsetmessages: + msg6505
2021-02-17 00:00:00adminsetstatus: drafting -> nad
2007-05-06 00:00:00adminsetstatus: open -> drafting
2007-02-06 00:00:00admincreate