This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

2014. More restrictions on macro names

Section: 16.4.5.3.3 [macro.names] Status: C++11 Submitter: Alberto Ganesh Barbati Opened: 2010-11-16 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [macro.names].

View all other issues in [macro.names].

View all issues with C++11 status.

Discussion:

A program is currently forbidden to use keywords as macro names. This restriction should be strengthened to include all identifiers that could be used by the library as attribute-tokens (for example noreturn, which is used by header <cstdlib>) and the special identifiers introduced recently for override control (these are not currently used in the library public interface, but could potentially be used by the implementation or in future revisions of the library).

[2011-02-10 Reflector discussion]

Moved to Tentatively Ready after 5 votes.

Proposed resolution:

Modify 16.4.5.3.3 [macro.names] paragraph 2 as follows:

A translation unit shall not #define or #undef names lexically identical to keywords, to the identifiers listed in Table X [Identifiers with special meaning], or to the attribute-tokens described in clause 7.6 [dcl.attr].