This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See for the official list.


1553. sizeof and xvalue bit-fields

Section:  [expr.sizeof]     Status: CD3     Submitter: Richard Smith     Date: 2012-09-13

[Moved to DR at the April, 2013 meeting.]

According to [expr.sizeof] paragraph 1,

The sizeof operator shall not be applied... to an lvalue that designates a bit-field.

Xvalues can also designate bit-fields and thus should presumably be addressed here as well.

Proposed resolution (October, 2012):

Change [expr.sizeof] paragraph 1 as follows:

The sizeof operator yields the number of bytes in the object representation of its operand. The operand is either an expression, which is an unevaluated operand (Clause 7 [expr]), or a parenthesized type-id. The sizeof operator shall not be applied to an expression that has function or incomplete type, to an enumeration type whose underlying type is not fixed before all its enumerators have been declared, to the parenthesized name of such types, or to an lvalue a glvalue that designates a bit-field. sizeof(char)...