This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-04-13
Subclause 5.6 [lex.header] specifies implementation-defined behavior for certain character sequences appearing in header-names. This is redundant with the implementation-defined searches specified in 15.3 [cpp.include] and 15.4.1 [cpp.embed.gen], which already cover recognition of \ escape sequences and similar implementation deviations.
Suggested resolution:
Change in 5.6 [lex.header] as follows:
The appearance of either of the characters ' or \ or of either of the character sequences /* or // in a q-char-sequence or an h-char-sequence is conditionally-supported with implementation-defined semantics, as is the appearance of the character " in an h-char-sequence.[Note 2: As specified in 15.3 [cpp.include] and 15.4 [cpp.embed], which header, source file, or resource is identified by a header-name, if any, is implementation-defined. Thus, a sequence of characters that resembles an escape sequence can result in an error, be interpreted as the character corresponding to the escape sequence, or have a completely different meaning, depending on the implementation. However, a " character cannot appear in an q-char-sequence, and a > character cannot appear in a h-char-sequence, even if preceded by a \ character. —end note]
Additional notes (March, 2025)
The new wording removes the permission for implementations to yield an error when a header-name contains ", \, or ' in a __has_include.