Title
More restrictions on macro names
Status
c++11
Section
[macro.names]
Submitter
Alberto Ganesh Barbati

Created on 2010-11-16.00:00:00 last changed 162 months ago

Messages

Date: 2011-02-10.14:44:52

Proposed resolution:

Modify [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].

Date: 2011-02-10.14:44:52

[ 2011-02-10 Reflector discussion ]

Moved to Tentatively Ready after 5 votes.

Date: 2010-11-16.00:00:00

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).

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2011-04-11 11:23:23adminsetstatus: voting -> wp
2011-03-05 15:24:28adminsetstatus: ready -> voting
2011-02-10 14:44:52adminsetmessages: + msg5478
2011-02-10 14:44:52adminsetstatus: new -> ready
2010-11-16 22:36:29adminsetmessages: + msg5373
2010-11-16 00:00:00admincreate