This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


2576. Undefined behavior with macro-expanded #include directives

Section: 15.3  [cpp.include]     Status: open     Submitter: US     Date: 2019-10-23     Liaison: SG12

(From National Body comment US 131 on the C++20 DIS.)

Subclause 15.3 [cpp.include] paragraph 4 specifies:

If the directive resulting after all replacements does not match one of the two previous forms, the behavior is undefined.

Undefined behavior during lexing is not acceptable. This ought to be ill-formed.

Additional notes (January, 2023):

Forwarded to SG12 with paper issue 1408, by decision of the CWG and SG12 chairs.