Skip to content

Commit 8749ca8

Browse files
committed
[basic.pre][basic.link] Names have linkage
An essential property of names is that they have linkage. Move the statement that names have linkage up from [basic.link] to [basic.pre] where the term `name` is defined, and before the references to linkage of names in the clauses between [basic.pre] and [basic.link].
1 parent 2ab6288 commit 8749ca8

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

source/basic.tex

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
\grammarterm{conversion-function-id}\iref{class.conv.fct},
3737
\grammarterm{operator-function-id}\iref{over.oper}, or
3838
\grammarterm{literal-operator-id}\iref{over.literal}.
39+
A name has
40+
\defnadj{external}{linkage},
41+
\defnadj{module}{linkage},
42+
\defnadj{internal}{linkage}, or
43+
\defnadj{no}{linkage},
44+
as determined by the rules in \ref{basic.link}.
3945

4046
\pnum
4147
Two names are \defnx{the same}{name!same} if
@@ -164,6 +170,12 @@
164170
refer to the same entity in these translation units depending on the
165171
linkage\iref{basic.link} of the name specified in each
166172
translation unit.
173+
\begin{note}
174+
All declarations of an entity with a name with internal linkage
175+
appear in the same translation unit.
176+
All declarations of an entity with module linkage
177+
are attached to the same module.
178+
\end{note}
167179

168180
\rSec1[basic.def]{Declarations and definitions}
169181

@@ -2885,6 +2897,7 @@
28852897

28862898
\pnum
28872899
\indextext{program}%
2900+
\indextext{translation unit}%
28882901
\indextext{linking}%
28892902
A \defn{program} consists of one or more translation units\iref{lex.phases}
28902903
linked together. A translation unit consists
@@ -2896,21 +2909,6 @@
28962909
\opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment}
28972910
\end{bnf}
28982911

2899-
\pnum
2900-
\indextext{translation unit}%
2901-
A name has
2902-
\defnadj{external}{linkage},
2903-
\defnadj{module}{linkage},
2904-
\defnadj{internal}{linkage}, or
2905-
\defnadj{no}{linkage},
2906-
as determined by the rules below.
2907-
\begin{note}
2908-
All declarations of an entity with a name with internal linkage
2909-
appear in the same translation unit.
2910-
All declarations of an entity with module linkage
2911-
are attached to the same module.
2912-
\end{note}
2913-
29142912
\pnum
29152913
\indextext{linkage!\idxcode{static} and}%
29162914
\indextext{\idxcode{static}!linkage of}%

0 commit comments

Comments
 (0)