C++ Logo

liaison

Advanced search

[isocpp-wg14/wg21-liaison] WG14 N3353 Potential small editorial mistake in obsolescence unprefixed octal literals

From: Jolly Chen <jolly.chen_at_[hidden]>
Date: Fri, 20 Jun 2025 11:08:31 +0300
Hi All,

We have discovered a potential small editorial mistake in the wording of
marking unprefixed octal-literals (e.g., 07 and 0042) obsolescent in the
C2y draft following the WG14 N3353 <Obsolete implicitly octal literals
and add delimited escape sequences> proposal (/Obsolete implicitly octal
literals and add delimited escape sequences/).

In paragraph 5 in section 6.4.5.2 of the C2y draft
<https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf>, it is stated:

    /An unprefixed octal literal begins with the digit 0 optionally
    followed by a sequence of the digits 0/
    /through 7 only. Use of an unprefixed octal literal with digits
    other than 0 is an obsolescent feature./

While working on the wording for the deprecation of unprefixed literals
in WG21 P0085
<https://htmlpreview.github.io/?https://github.com/jolly-chen/cpp-proposals/blob/main/d0085r3.html> (/Oo...
adding a coherent character sequence to begin octal-literals)/, we
noticed that it is unclear whether 000 is obsolescent.

We reached out to some of the authors of the WG14 N3353 paper (Aaron
Ballman and Corentin Jabot) and Aaron confirmed that their intent was to
make obsolescent all octal literals starting with a 0 instead of 0o,
except the literal 0. This means that the octal literal 000 is
obsolescent, but 0 is not, as implemented by Aaron for Clang:
https://www.godbolt.org/z/jEa4qnaMo

Aaron Ballman has pinged the WG14 reflectors to confirm that WG14 agrees
with the authors' design intent.

In our WG21 P0085 paper, we agree with the declared design intent of the
authors of N3353, deprecating also 000. It would be good if C and C++
could agree here, and the wording of C be clarified if WG14 believes
that is needed.

Best,
Jolly

Received on 2025-06-20 08:08:42