Skip to content

[lex.separate][module.unit] move definitions of program and translation unit #7180

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

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

Conversation

AlisdairM
Copy link
Contributor

@AlisdairM AlisdairM commented Jul 28, 2024

The definition of program at the top of [basic.link] should move to the front of [lex.separate] so that it is defined before its first usage, and also clarifies what the phases of translation produce.

The description of translation unit in [basic.link] is provided only to support the definition of program. However, that description is no longer useful now that the term has a definition in [lex.phases]. The description is also never referenced In the rest of [basic.link]. If we remove that description, then there is nothing tying the definition of the grammar term translation-unit to [basic.link] either, so move it to the place where that definition is most useful, at the top of [module.unit]. It is tempting to move the grammar definitions of global-module-framgment and private-module-framgment to the collected grammar at the top of this clause two, but leaving them in their current subclauses for now, pending further feedack.

Finally, retitle [basic.link] as just Linkage, rather than Programs and linkage, as the subclause was never about the terms described in the opening paragraph and never mention again (within this clause).

@AlisdairM
Copy link
Contributor Author

Just to confirm that I looked at every reference for program and translation unit to see if they had a cross reference that should be updated. These terms occur quite frequently, but rarely have a cross-reference, and in those places that do have a cross reference, they are frequently cross referencing a concept in the whole sentence rather than a definition of either term.

@AlisdairM AlisdairM force-pushed the move_definition_of_program branch 2 times, most recently from 86d979a to 413da6a Compare October 23, 2024 12:54
@AlisdairM
Copy link
Contributor Author

Note to CWG chair: this PR, if accepted, would seem to be making progress towards resolving http://wg21.link/cwg2670.

@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Jul 24, 2025
…on unit

The definition of program at the top of [basic.link] should move to
the front of [lex.separate] so that it is defined before its first
usage, and also clarifies that is what the phases of translation produce.

Similarly, move the definition of the grammar production translation-unit
to the top of the only clause whose grammar actually uses it, [module.unit].

Finally, retitle [basic.link] as just Linkage, rather than
Programs and linkage.
@AlisdairM AlisdairM force-pushed the move_definition_of_program branch from 413da6a to be3e611 Compare August 1, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy