Date
2013-12-02.00:00:00
Message id
4755

Content

7.3.9 [conv.integral] paragraph 3 says, regarding integral conversions,

If the destination type is signed, the value is unchanged if it can be represented in the destination type (and bit-field width); otherwise, the value is implementation-defined.

The values that can be represented in a bit-field are not well specified, except for the correspondence with the values of an enumeration in 9.8.1 [dcl.enum]. In particular, it is not clear whether a bit-field has a sign bit and whether bit-fields may have padding bits.

Another point to note in this wording: paragraph 1 describes the context as

A prvalue of an integer type can be converted to a prvalue of another integer type.

However, prvalues cannot be bit-fields, so the applicability of the mention of “bit-field width” in paragraph 3 is unclear.