sizeof and xvalue bit-fields
Section [expr.sizeof]
Richard Smith

Created on 2012-09-13.00:00:00 last changed 90 months ago


Date: 2013-04-15.00:00:00

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

Date: 2012-10-15.00:00:00

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 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)...
Date: 2012-09-13.00:00:00

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.

Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2013-10-14 00:00:00adminsetstatus: dr -> drwp
2013-05-03 00:00:00adminsetmessages: + msg4385
2013-05-03 00:00:00adminsetstatus: ready -> dr
2012-11-03 00:00:00adminsetmessages: + msg4048
2012-11-03 00:00:00adminsetstatus: open -> ready
2012-09-13 00:00:00admincreate