Skip to content

Conversation

Endilll
Copy link
Contributor

@Endilll Endilll commented Jan 28, 2025

[basic.scope.scope] has a lengthy note about declarations that target a different scope than the scope they inhabit. This patch updates a bullet about declarations inhabiting a block scope in accordance with [dcl.meaning]/3.5 to make the note more complete:

If the declaration inhabits a block scope S and declares a function ([dcl.fct]) or uses the extern specifier, the declaration shall not be attached to a named module ([module.unit]); its target scope is the innermost enclosing namespace scope, but the name is bound in S.

@Endilll
Copy link
Contributor Author

Endilll commented Jan 28, 2025

MacOS is failing with

/Library/TeX/texbin/tlmgr: checksum error when downloading /tmp/nUef4otpiw/wzBWoj7dcM from https://us.mirrors.cicku.me/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb: digest disagree

I'm not sure this is my fault.

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

I'm fine with adding the cross-reference.
I don't think notes need to be exhaustive or precise; they just have to be correct.
The existing note seems to be correct; if the missing mention of "function declarations" is the concern, I'm ok adding those: "Block-scope extern or function declarations..."
Other bullets in this note also talk about "larger enclosing scope".

@Endilll
Copy link
Contributor Author

Endilll commented Jan 28, 2025

if the missing mention of "function declarations" is the concern, I'm ok adding those: "Block-scope extern or function declarations..."

Yes, this is the primary concern I have. I applied your suggestion.

Other bullets in this note also talk about "larger enclosing scope".

I see; I reverted the part about innermost namespace scope.

@tkoeppe tkoeppe merged commit dfdc64c into cplusplus:main Feb 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants