Skip to content

Commit 71b8b7e

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 c07c130 commit 71b8b7e

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 can have
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
@@ -157,6 +163,12 @@
157163
refer to the same entity in these translation units depending on the
158164
linkage\iref{basic.link} of the name specified in each
159165
translation unit.
166+
\begin{note}
167+
All declarations of an entity with a name with internal linkage
168+
appear in the same translation unit.
169+
All declarations of an entity with module linkage
170+
are attached to the same module.
171+
\end{note}
160172

161173
\rSec1[basic.def]{Declarations and definitions}
162174

@@ -2875,6 +2887,7 @@
28752887

28762888
\pnum
28772889
\indextext{program}%
2890+
\indextext{translation unit}%
28782891
\indextext{linking}%
28792892
A \defn{program} consists of one or more translation units\iref{lex.separate}
28802893
linked together. A translation unit consists
@@ -2886,21 +2899,6 @@
28862899
\opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment}
28872900
\end{bnf}
28882901

2889-
\pnum
2890-
\indextext{translation unit}%
2891-
A name can have
2892-
\defnadj{external}{linkage},
2893-
\defnadj{module}{linkage},
2894-
\defnadj{internal}{linkage}, or
2895-
\defnadj{no}{linkage},
2896-
as determined by the rules below.
2897-
\begin{note}
2898-
All declarations of an entity with a name with internal linkage
2899-
appear in the same translation unit.
2900-
All declarations of an entity with module linkage
2901-
are attached to the same module.
2902-
\end{note}
2903-
29042902
\pnum
29052903
\indextext{linkage!\idxcode{static} and}%
29062904
\indextext{\idxcode{static}!linkage of}%

0 commit comments

Comments
 (0)
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