Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dcl.init, dcl.stc] Move specification as to where extern is allowed into [dcl.stc] #3894

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sdkrystian
Copy link
Contributor

The current specification lives in [dcl.init], but it fits better in the specification of extern, since the only way a local variable can acquire external or internal linkage is through the use of extern, and it's better to specify such broad restrictions in one place.

source/declarations.tex Outdated Show resolved Hide resolved
Comment on lines +409 to +410
declaration of a class member, function parameter, or block-scope variable with
an \grammarterm{initializer}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes it sound like it's OK to use extern with a class member or function parameter so long as there's no initializer. Moving the "block-scope variable with an initializer" case to the start of the list would help.

@zygoloid zygoloid added the changes requested Changes to the wording or approach have been requested and not yet applied. label Oct 18, 2020
@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Jun 15, 2021
@jensmaurer jensmaurer removed this from the C++23 milestone Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants