This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Accepted as a DR at the March, 2024 meeting.]
The resolution for issue 2518 disallows existing implementation practice, as detailed below:
Suggested resolution [SUPERSEDED]:
Change in 4.1.1 [intro.compliance.general] paragraph 2 as follows:
Furthermore, a conforming implementation
- shall not accept a preprocessing translation unit containing a #error preprocessing directive (15.8 [cpp.error])
,andshall issue at least one diagnostic message for each #warning or #error preprocessing directive not following a #error preprocessing directive in a preprocessing translation unit, and- shall not accept a translation unit with a static_assert-declaration that fails (9.1 [dcl.pre]).
Change in 5.1 [lex.separate] paragraph 1 as follows:
The text of the program is kept in units called source files in this document. A source file together with all the headers (16.4.2.3 [headers]) and source files included (15.3 [cpp.include]) via the preprocessing directive #include, less any source lines skipped by any of the conditional inclusion (15.2 [cpp.cond]) preprocessing directives or by the implementation-defined behavior of any conditionally-supported-directives (15.1 [cpp.pre]), is called a preprocessing translation unit.
CWG 2023-03-03
Permit that #warning can be ignored if another diagnostic is produced.
Proposed resolution (approved by CWG 2024-01-19):
Change in 4.1.1 [intro.compliance.general] bullet 2.3 as follows:
- ...
- Otherwise, if a program contains
a conforming implementation shall issue at least one diagnostic message.
- a violation of any diagnosable rule
or,- a preprocessing translation unit with a #warning preprocessing directive (15.8 [cpp.error]), or
- an occurrence of a construct described in this document as “conditionally-supported” when the implementation does not support that construct,
Change in 4.1.1 [intro.compliance.general] paragraph 2 as follows:
Furthermore, a conforming implementation shall not accept
- a preprocessing translation unit containing a #error preprocessing directive (15.8 [cpp.error])
,orshall issue at least one diagnostic message for each #warning or #error preprocessing directive not following a #error preprocessing directive in a preprocessing translation unit, andshall not accepta translation unit with a static_assert-declaration that fails (9.1 [dcl.pre]).
Change in 5.1 [lex.separate] paragraph 1 as follows:
The text of the program is kept in units called source files in this document. A source file together with all the headers (16.4.2.3 [headers]) and source files included (15.3 [cpp.include]) via the preprocessing directive #include, less any source lines skipped by any of the conditional inclusion (15.2 [cpp.cond]) preprocessing directives, as modified by the implementation-defined behavior of any conditionally-supported-directives (15.1 [cpp.pre]) and pragmas (15.9 [cpp.pragma]), if any, is called a preprocessing translation unit.
Change in 15.8 [cpp.error] as follows:
A preprocessing directive ofeither of the following formsthe form# error pp-tokensopt new-linerenders the program ill-formed. A preprocessing directive of the form# warning pp-tokensopt new-linecausesrequires the implementation to produceaat least one diagnostic message for the preprocessing translation unit (4.1.1 [intro.compliance.general])that.Recommended practice: Any diagnostic message caused by either of these directives should include the specified sequence of preprocessing tokens
; the #error directive renders the program ill-formed.