Created on 2024-09-27.00:00:00 last changed 4 days ago
Proposed resolution (approved by CWG 2024-11-08):
Change in 5.2 [lex.phases] bullet 1.4 as follows:
- ...
- The source file is analyzed as a preprocessing-file (15.1 [cpp.pre]). Preprocessing directives are executed, macro invocations are expanded, and _Pragma unary operator expressions are executed. A #include preprocessing directive causes the named header or source file to be processed from phase 1 through phase 4, recursively. All preprocessing directives are then deleted.
- ...
Change in 5.2 [lex.phases] bullet 1.7 as follows:
Whitespace characters separating tokens are no longer significant. Each preprocessing token is converted into a token (5.10 [lex.token]). The resulting tokens constitute a translation unit and are syntactically and semantically analyzed as a translation-unit (6.6 [basic.link]) and translated.
[Accepted as a DR at the November, 2024 meeting.]
(From submission #615.)
Subclause 15.1 [cpp.pre] defines the grammar production preprocessing-file, but nothing in the standard specifies that a translation unit is ill-formed if it fails to match that grammar. Similarly, translation-unit has no effect.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-12-17 09:54:02 | admin | set | status: ready -> dr |
2024-12-06 09:40:31 | admin | set | status: tentatively ready -> ready |
2024-11-09 00:21:39 | admin | set | status: open -> tentatively ready |
2024-10-02 22:05:32 | admin | set | messages: + msg7832 |
2024-09-27 00:00:00 | admin | create |