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

2026-11-21


3120. Incorrect description for interpreting integer literals

Section: 5.13.2  [lex.icon]     Status: review     Submitter: Masaki Moriguchi     Date: 2025-11-08

(From submission #794.)

The octal integer literal 0 is not covered by the rule in 5.13.2 [lex.icon] paragraph 1.

Proposed resolution option 1 (reviewed by CWG 2026-10-27, with low quorum):

Change in 5.13.2 [lex.icon] paragraph 1 as follows:

In an integer-literal, is interpreted as a base N integer as shown in Table 7; the lexically first digit of the sequence of digits is the most significant.

Proposed resolution option 2

Change in 5.13.2 [lex.icon] paragraph 1 as follows:

In an integer-literal, the sequence of binary-digits, octal-digits, digits, or hexadecimal-digits is interpreted as a base N integer as shown in Table 7; the lexically first digit of the sequence of digits is the most significant. If the sequence is empty, the integer-literal has the value zero. ...