cplusplus / cplusplus/draft

[over.oper.general] p7 Precedence is not a formal wording nor specified

Open
#5,475 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

[over.oper.general] p7 says

It is not possible to change the precedence, grouping, or number of operands of operators.

The "precedence" is not directly specified in this document, it is implied by the syntaxes of the grammar of expressions. [expr.footnote] p42 says

The precedence of operators is not directly specified, but it can be derived from the syntax.

It is plausible to use syntax in this wording to imply the precedence is not changed.

It is not possible to change the syntax, grouping, or number of operands of operators.

A + B * C;

Assume that A, B, and C are of class types. The expression is interpreted as additive-expression + multiplicative-expression rather than additive-expression * id-expression.

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 [over.oper.general] p7 and compare its wording with [expr.footnote] p42, using the A + B * C example to understand how precedence follows from grammar syntax. Done means deciding whether the wording should say “syntax” and updating the relevant standards-draft text consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.