Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-20


1553.sizeof and xvalue bit-fields

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

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

According to 7.6.2.5 [expr.sizeof] paragraph 1,

Thesizeof operator shall not be applied... to an lvaluethat designates a bit-field.

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

Proposed resolution (October, 2012):

Change 7.6.2.5 [expr.sizeof] paragraph 1 as follows:

Thesizeof operator yields the number of bytes in the objectrepresentation of its operand. The operand is either an expression,which is an unevaluated operand (Clause 7 [expr]), or aparenthesizedtype-id. Thesizeof operator shall notbe applied to an expression that has function or incomplete type, toan enumeration type whose underlying type is not fixed before all itsenumerators have been declared, to the parenthesized name of suchtypes, or toan lvaluea glvalue that designatesa bit-field.sizeof(char)...



[8]ページ先頭

©2009-2026 Movatter.jp