cplusplus / cplusplus/draft

[syntax] p2 Add "X-expression" in the list

Open
#5,543 0 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

All grammars defined in [expr] that have the form X-expression are intended to interpret as expressions. And we use the literal word "expression" in another subclause such as [basic.def.odr] to define some rules for these expressions.

extern int b;
int a = b;

b as the grammar component initializer that is an assignment-expression should eventually obey the rule defined for "expression" in [basic.def.odr](i.e. the variable b is odr-used by an expression). In the current draft, we just have a note specifying that X-expression is the syntax of an expression
[expr.pre] p1

[Note 1: [expr] defines the syntax, order of evaluation, and meaning of expressions. An expression is a sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects. — end note]

Augment [syntax] p2 to cover the meaning of the note

Names for syntactic categories have generally been chosen according to the following rules:

  • [...]
  • X-expression is an expression with no context-dependent meaning.

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 by reading [syntax] p2 and compare its category-naming rules with the note in [expr.pre] p1. Update the wording in [syntax] p2 so the stated meaning of X-expression is covered, then review the surrounding standard text for consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.