[basic.scope.pdecl] What is the locus of a function-definition?
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
The subclause [basic.scope.pdecl] does not explicitly mention the locus of a function-definition. Presumably, [basic.scope.pdecl] p1 intends to cover this case but it is incorrect
The locus of a declaration ([basic.pre]) that is a declarator is immediately after the complete declarator ([dcl.decl]).
is means they are identical or they are the same thing. Even though the formal example is not consistent with the utterance
unsigned char x = x;
unsigned char x = x; is the whole declaration whose declarator is merely the first x which is a declarator-id, they are not the same thing. The improvement to this bullet is that:
The locus of a declaration ([basic.pre]) that contains a declarator is immediately after the complete declarator ([dcl.decl]).
This change may clarify the fist example, and it can also cover the function-definition
- attribute-specifier-seqoptdecl-specifier-seqopt declarator virt-specifier-seq opt function-body
- attribute-specifier-seqopt decl-specifier-seqopt declarator requires-clause function-body
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading subclause [basic.scope.pdecl] p1 and the definition of locus, then compare the unsigned char x = x; example with the function-definition grammar shown in the issue. Check the surrounding discussion before changing the wording. Done means the clause accurately distinguishes declarations from declarators and explicitly covers function-definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100