This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2818. Use of predefined reserved identifiers

Section: 5.10  [lex.name]     Status: DR     Submitter: Jiang An     Date: 2023-01-18

[Accepted as a DR at the June, 2024 meeting.]

Subclause 5.10 [lex.name] paragraph 3 specifies:

In addition, some identifiers appearing as a token or preprocessing-token are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

That implies that uses of standard-specified predefined macros (15.11 [cpp.predefined]) or feature-test macros (17.3.2 [version.syn]) make the program ill-formed. This does not appear to be the intent.

Proposed resolution (approved by CWG 2024-01-19) [SUPERSEDED]:

Change in 5.10 [lex.name] paragraph 3 and add bullets as follows:

In addition, some identifiers appearing as a token or preprocessing-token are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

CWG 2024-03-20

The exceptions should not be specified using a specific list, which might become stale in the future.

Proposed resolution (approved by CWG 2024-03-20):

Change in 5.10 [lex.name] paragraph 3 and add bullets as follows:

In addition, some identifiers appearing as a token or preprocessing-token are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.