cplusplus / cplusplus/draft

[lex.icon] p1 does not clearly cover the (single-digit) integer literal '0' CWG3120

Open
#8,380 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cwg not-editorial
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

PR #3650 slimmed down [lex.icon] p1 to

In an \grammarterm{integer-literal}, the sequence of \grammarterm{binary-digit}s, \grammarterm{octal-digit}s, \grammarterm{digit}s, or \grammarterm{hexadecimal-digit}s is interpreted as a base $N$ integer

However, the zero in the octal integer literal '0' is not a (grammar term) octal-digits. So '0' falls outside of this wording.

For reference:

\begin{bnf}
\nontermdef{octal-literal}\br
    \terminal{0}\br
    octal-literal \opt{\terminal{'}} octal-digit
\end{bnf}
\begin{bnf}
\nontermdef{octal-digit} \textnormal{one of}\br
    \terminal{0  1  2  3  4  5  6  7}
\end{bnf}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at [lex.icon] p1 and compare its integer-literal wording with the octal-literal and octal-digit grammar shown in the issue. Check that the paragraph explicitly accounts for the single-digit literal '0'; done means the wording no longer leaves that literal outside its stated interpretation.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.