Title
Undefined behavior for preprocessing directives in macro arguments
Status
open
Section
15.6.1 [cpp.replace.general]
Submitter
US

Created on 2019-10-23.00:00:00 last changed 3 weeks ago

Messages

Date: 2023-01-15.00:00:00

Additional notes (January, 2023):

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

Date: 2019-10-23.00:00:00

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

Subclause 15.6.1 [cpp.replace.general] paragraph 13 specifies:

If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives, [ Footnote: ...] the behavior is undefined.

Undefined behavior during lexing is not acceptable. The behavior ought to be ill-formed or conditionally-supported. Some implementation support an #if section, others reject that.

History
Date User Action Args
2023-01-05 08:22:04adminsetmessages: + msg7111
2019-10-23 00:00:00admincreate