A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/645.html below:

CWG Issue 645

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

2025-04-13

645. Are bit-field and non-bit-field members layout compatible?Section: 11.4  [class.mem]     Status: CD2     Submitter: Alan Stokes     Date: 9 Aug 2007

[Voted into the WP at the March, 2009 meeting.]

The current wording defining a “common initial sequence” in 11.4 [class.mem] paragraph 17 does not address the case in which one member is a bit-field and the corresponding member is not:

Two standard-layout structs share a common initial sequence if corresponding members have layout-compatible types (and, for bit-fields, the same widths) for a sequence of one or more initial members.

Presumably the intent was something like, “(and, if one of the pair is a bit-field, the other is also a bit-field of the same width).”

Proposed Resolution (September, 2008):

Change 11.4 [class.mem] paragraph 18 as follows:

... Two standard-layout structs share a common initial sequence if corresponding members have layout-compatible types (and, for bit-fields, the same widths) and either neither member is a bit-field or both are bit-fields with the same widths for a sequence of one or more initial members.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4