Created on 2023-02-13.00:00:00 last changed 5 months ago
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.
CWG 2023-03-03
Permit that #warning can be ignored if another diagnostic is produced.
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.
[Accepted as a DR at the March, 2024 meeting.]
The resolution for issue 2518 disallows existing implementation practice, as detailed below:
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-07-20 13:52:34 | admin | set | status: dr -> drwp |
2024-04-05 21:43:46 | admin | set | status: ready -> dr |
2024-03-20 14:10:31 | admin | set | status: tentatively ready -> ready |
2024-01-21 13:30:12 | admin | set | status: review -> tentatively ready |
2023-03-07 22:58:33 | admin | set | messages: + msg7219 |
2023-03-07 22:58:33 | admin | set | messages: + msg7218 |
2023-03-07 22:58:33 | admin | set | status: open -> review |
2023-02-27 21:04:26 | admin | set | messages: + msg7211 |
2023-02-13 00:00:00 | admin | create |