Created on 2025-03-24.00:00:00 last changed 1 week ago
Suggested resolution:
Change in 15.2 [cpp.cond] paragraph 4 as follows:
The header or source file identified by the parenthesized preprocessing token sequence in each contained has-include-expression is searched for as if that preprocessing token sequence were the pp-tokens in a #include directive, except that no further macro expansion is performed. Ifsuch a directive would not satisfy the syntactic requirements of a #include directivethe preprocessing token sequence does not consist solely of a header-name or cannot be combined (15.3 [cpp.include]) into a single header-name preprocessing token, the program is ill-formed. The has-include-expression evaluates to 1 if the search for the source file succeeds, and to 0 if the search fails.
Change in 15.2 [cpp.cond] paragraph 5 as follows:
The parenthesized pp-balanced-token-seq in each contained has-embed-expression is processed as if that pp-balanced-token-seq were the pp-tokens in the third form of a #embed directive (15.4 [cpp.embed]).If such a directive would not satisfy the syntactic requirements of a #embed directive, the program is ill-formed.The has-embed-expression evaluates to: ...
(From submission #691.)
Subclause 15.2 [cpp.cond] paragraph 4 talks about the "syntactic requirements of a #include directive". However, those requirements are always satisfied, because the only requirement is to have a sequence of preprocessing tokens according to the grammar in 15.1 [cpp.pre].
However, a syntax check for properly forming a header-name needs to be retained, because 15.3 [cpp.include] paragraph 4 otherwise would yield undefined behavior.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-03-24 16:12:06 | admin | set | messages: + msg8003 |
2025-03-24 00:00:00 | admin | create |