[lex.separate][module.unit] move definitions of program and translation unit #7180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).