Created on 2021-09-14.00:00:00 last changed 7 months ago
CWG 2023-07-14
CWG noted that a lone backslash at the end of a file remains (in the status quo and with the proposed change) and turns into an ill-formed preprocessing-token. The wording as amended seems sufficiently clear to consider issue 1698 resolved.
Proposed resolution (approved by CWG 2023-07-14):
Change in 5.2 [lex.phases] paragraph 2 as follows:
... Each sequence of a backslash character (\) immediately followed by zero or more whitespace characters other than new-line followed by a new-line character is deleted, splicing physical source lines to form logical source lines. ... A source file that is not empty and that (after splicing) does not end in a new-line character, or that ends in a splice,shall be processed as if an additional new-line character were appended to the file.
[Accepted as a DR at the November, 2023 meeting.]
(From editorial issue 4903.)
Subclause 5.2 [lex.phases] paragraph 2 specifies:
... Each sequence of a backslash character (\) immediately followed by zero or more whitespace characters other than new-line followed by a new-line character is deleted, splicing physical source lines to form logical source lines. ... A source file that is not empty and that does not end in a new-line character, or that ends in a splice, shall be processed as if an additional new-line character were appended to the file.
This is confusing, because the first sentence deletes all splices, and then the last sentence checks for a splice that has already been deleted.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-04-05 21:43:46 | admin | set | status: dr -> drwp |
2023-12-19 10:15:28 | admin | set | status: ready -> dr |
2023-07-14 22:00:05 | admin | set | messages: + msg7367 |
2023-07-14 22:00:05 | admin | set | messages: + msg7366 |
2023-07-14 22:00:05 | admin | set | status: open -> ready |
2021-09-14 00:00:00 | admin | create |