Created on 2025-10-01.00:00:00 last changed 1 month ago
Proposed resolution (approved by CWG 2025-10-24):
Change in 15.13 [cpp.pragma.op] paragraph 1 as follows:
A unary operator expression of theform:form_Pragma ( string-literal )is processed as follows: The string-literal is destringized by deletingthe L prefix, if presentany encoding-prefix, deleting the leading and trailing double-quotes, replacing each escape sequence \" by a double-quote, and replacing each escape sequence \\ by a single backslash. The resulting sequence of characters is processed through translation phase 3 to produce preprocessing tokens that are executed as if they were the pp-tokens in a pragma directive. The original four preprocessing tokens in the unary operator expression are removed.
Subclause 15.13 [cpp.pragma.op] paragraph 1 specifies:
A unary operator expression of the form:_Pragma ( string-literal )is processed as follows: The string-literal is destringized by deleting the L prefix, if present, deleting the leading and trailing double-quotes, replacing each escape sequence \" by a double-quote, and replacing each escape sequence \\ by a single backslash. The resulting sequence of characters is processed through translation phase 3 to produce preprocessing tokens that are executed as if they were the pp-tokens in a pragma directive. The original four preprocessing tokens in the unary operator expression are removed.
The destringizing does not, but should, consider encoding-prefixes other than L.
See also C23 6.10.11.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-06 23:04:52 | admin | set | status: tentatively ready -> ready |
| 2025-11-04 00:45:48 | admin | set | messages: + msg8198 |
| 2025-11-04 00:45:48 | admin | set | status: open -> tentatively ready |
| 2025-10-01 00:00:00 | admin | create | |