-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Full name of submitter (unless configured in github; will be published with the issue): Hubert Tong
Reference (section label): [cpp.pre]
Link to reflector thread (if any): N/A
Issue description:
https://wg21.link/cpp.pre#1.2 triggers import
directive recognition for
#define STR(X) #X
const char *str = STR(
import u8"hello";
);
Such an import
directive invariably leads to IFNDR (see #768). The stated goal of https://wg21.link/p1857 is to "[fine-tune] the context-sensitivity of import
[ ... ]". The string-literal provision for triggering import
directive recognition at the start of phase 4 is not consistent with such an intent: since header-names are directly formed in this context, the only string-literals seen will lead to IFNDR.
Suggested resolution:
Strike in https://wg21.link/cpp.pre#1.2:
- an import preprocessing token immediately followed on the same logical source line by a header-name,
<
, identifier,string-literal,or:
preprocessing token, or
Metadata
Metadata
Assignees
Labels
No labels