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


832. Value of preprocessing numbers

Section: 5.9  [lex.ppnumber]     Status: CD2     Submitter: UK     Date: 3 March, 2009

N2800 comment UK 13

[Voted into WP at October, 2009 meeting.]

5.9 [lex.ppnumber] paragraph 2 says,

A preprocessing number does not have a type or a value; it acquires both after a successful conversion (as part of translation phase 7, 5.2 [lex.phases]) to an integral literal token or a floating literal token.

However, preprocessing directives are executed in phase 4, and the evaluation of constant-expressions in #if directives requires that preprocessing numbers have values.

Proposed resolution (July, 2009):

Change 5.9 [lex.ppnumber] paragraph 2 as follows:

A preprocessing number does not have a type or a value; it acquires both after a successful conversion (as part of translation phase 7 (5.2 [lex.phases])) to an integral literal token or a floating literal token.