This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 120c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2026-09-04
(From submission #975.)
Consider:
#define FOO(...) FOO( #include <iostream> )
This is ill-formed per 15.7.1 [cpp.replace.general] paragraph 14.
... If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives, [Footnote: ...] the program is ill-formed.
However, what about this:
#define FOO(...) FOO( #if )
According to 15.7.1 [cpp.replace.general] paragraph 14, the closing parenthesis is not part of the analysis for a "preprocessing directive" (note "within"), but 15.1 [cpp.pre] paragraph 2 requires a trailing new-line for some text to be recognized as a preprocessing directive (which is not "within" the arguments here).
Proposed resolution (approved by CWG 2026-09-01):
Change in 15.7.1 [cpp.replace.general] paragraph 14 as follows:
... If thereare sequences of preprocessing tokensis whitespace containing at least one new-line character immediately followed by a directive-introducing token (15.1 [cpp.pre]) within the list of argumentsthat would otherwise act as preprocessing directives,[Footnote: A conditionally-supported-directive is a preprocessing directive regardless of whether the implementation supports it.]the program is ill-formed.