Type Compatibility: Ghosts, Readability, and A Missing Rule for Atomic

Martin Uecker

2026-04-29

Preamble

contributing

Martin Uecker (rationale, history, wording)

Joseph Myers, Robert Seacord, Jens Gustedt (wording)

rationale

This removes misleading “shall” that does not indicate undefined behavior and adds a missing rule for atomic. A previous version of this paper N3742 received strong support and was sent to the wording group. In the discussion, it was noted that additional statements about qualified and atomic types and compatibility may be needed.

number Title Authors Remarks
N3742 Type Compatibility: Ghosts, Readability, and A Missing Rule for Atomic (Updates n3713) Uecker
n3713 Type Compatibility: Ghosts, Readability, and A Missing Rule for Atomic Uecker
SC22WG14.35405 N3742 type compatibility wording changes Myers comments
n3856 Draft Minutes for March 9 - 13, 2026 Svoboda
n3881 <this paper> Wording group

LaTeX document branch

none

Liaison

none

Relevant polls

Along the lines of n3742

meeting date for against abstain
March 26 2026-03 17 0 0

Proposed wording

Legend

Deletions in the shown standard text are as shown here, additions, as shown here. These may render differently according to the style in which the document is shown by your browser, but should always be well distinguishable. In the provided style there are two visual distinctions:

Close to each other proposed changes resemble like this.

Modifications in subclause 6.7.4.1

11 Two qualified types are compatible if and only if they are identically qualified versions of compatible types; the order of type qualifiers within a list of specifiers or qualifiers does not affect the specified type. A qualified type is incompatible with an unqualified type. An atomic type is incompatible with a non-atomic type.

Modifications in subclause 6.7.7.2

6.7.7.2 Pointer declarators

Semantics

2 For two pointer types to be compatible, both shall be identically qualified and both shall be pointers to compatible types. Two unqualified, non-atomic pointer types are compatible if and only if both are pointers to compatible types.

Modifications in subclause 6.7.3.5

Semantics

4 …

4′ Two atomic types are compatible if and only if the corresponding non-atomic types are compatible.