Skip to content

Commit 8c19937

Browse files
committed
[lex.separate][module.unit] move definitions of program and translation 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 the phases of translation produce. Similarly, move the definition of the grammar production translation-unit to the top of the first clause to actually use it, [module.unit]. Finally, retitle [basic.link] as just Linkage, rather than prgrams and linkage.
1 parent 9b3d01e commit 8c19937

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

source/basic.tex

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,23 +2649,10 @@
26492649
only namespace names are considered.%
26502650
\indextext{lookup!name|)}%
26512651

2652-
\rSec1[basic.link]{Program and linkage}%
2652+
\rSec1[basic.link]{Linkage}%
26532653
\indextext{linkage|(}
26542654

26552655
\pnum
2656-
\indextext{program}%
2657-
A \defn{program} consists of one or more translation units\iref{lex.separate}
2658-
linked together. A translation unit consists
2659-
of a sequence of declarations.
2660-
2661-
\begin{bnf}
2662-
\nontermdef{translation-unit}\br
2663-
\opt{declaration-seq}\br
2664-
\opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment}
2665-
\end{bnf}
2666-
2667-
\pnum
2668-
\indextext{translation unit}%
26692656
A name can have
26702657
\defnadj{external}{linkage},
26712658
\defnadj{module}{linkage},

source/intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@
476476
\begin{defnote}
477477
Only one definition for such a function is in effect for the duration of the program's
478478
execution, as the result of creating the program\iref{lex.phases} and resolving the
479-
definitions of all translation units\iref{basic.link}.
479+
definitions of all translation units\iref{module.unit}.
480480
\end{defnote}
481481

482482
\definition{required behavior}{defns.required.behavior}

source/lex.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424

2525
\rSec1[lex.separate]{Separate translation}
2626

27+
\pnum
28+
\indextext{program}%
29+
A \defn{program} consists of one or more translation units\iref{lex.phases,module.unit}
30+
linked together.
31+
2732
\pnum
2833
\indextext{conventions!lexical|(}%
2934
\indextext{compilation!separate|(}%

source/modules.tex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
\rSec1[module.unit]{Module units and purviews}
77

88
\begin{bnf}
9+
\nontermdef{translation-unit}\br
10+
\opt{declaration-seq}\br
11+
\opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment}
12+
913
\nontermdef{module-declaration}\br
1014
\opt{export-keyword} module-keyword module-name \opt{module-partition} \opt{attribute-specifier-seq} \terminal{;}
1115
\end{bnf}
@@ -26,6 +30,10 @@
2630
module-name-qualifier identifier \terminal{.}
2731
\end{bnf}
2832

33+
\pnum
34+
\indextext{translation unit}%
35+
A translation unit consists of a sequence of declarations.
36+
2937
\pnum
3038
A \defn{module unit} is a translation unit that contains
3139
a \grammarterm{module-declaration}.

0 commit comments

Comments
 (0)