This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-10-11
(From submission #769.)
Consider:
#define STR(X) #X
const char *str = STR(
import u8"hello"; // #1
);
Line #1 is recognized as an import directive, even though the eventual attempt to form a header-name will be IFNDR (see issue 3076). This is incongruent with the stated design goal of P1857: since a header-name is lexed right away, any string-literals that remain are necessarily invalid.
Proposed resolution (approved by CWG 2025-09-26):
Change in 15.1 [cpp.pre] bullet 1.2 as follows:
- ...
- an import preprocessing token immediately followed on the same logical source line by a header-name, <, identifier,
string-literal,or : preprocessing token, or- ...