Movatterモバイル変換


[0]ホーム

URL:


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

2025-11-05


1861. Values of a bit-field

Section:11.4.10  [class.bit]    Status:CD4    Submitter:Hubert Tong    Date:2014-02-13

[Adopted at the June, 2016 meeting.]

The resolution ofissue 1816 left manyaspects of bit-fields unspecified, including whether a signed bit fieldhas a sign bit and the meaning of the bit-field width. Also, therequirement in 6.9.2 [basic.fundamental] paragraph 1 that

For narrow character types, all bits of the object representationparticipate in the value representation.

should not apply to oversize character-typed bit-fields.

Notes from the June, 2014 meeting:

CWG decided to address only the issue of oversized bit-fields ofnarrow character types at this time, splitting off the more generalquestions regarding bit-fields toissue 1943.

Proposed resolution (April, 2016):

Change 6.9.2 [basic.fundamental] paragraph 1 as follows:

...For narrow character types, all bits of the objectrepresentation participate in the value representation.[Note: A bit-field of narrow character typewhose length is larger than the number of bits in the objectrepresentation of that type has padding bits; see11.4.10 [class.bit]. —end note] Forunsigned narrow character types, each possible bit patternof the value representation represents a distinct number...



[8]ページ先頭

©2009-2025 Movatter.jp