|
36 | 36 | \grammarterm{conversion-function-id}\iref{class.conv.fct}, |
37 | 37 | \grammarterm{operator-function-id}\iref{over.oper}, or |
38 | 38 | \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}. |
39 | 45 |
|
40 | 46 | \pnum |
41 | 47 | Two names are \defnx{the same}{name!same} if |
|
164 | 170 | refer to the same entity in these translation units depending on the |
165 | 171 | linkage\iref{basic.link} of the name specified in each |
166 | 172 | 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} |
167 | 179 |
|
168 | 180 | \rSec1[basic.def]{Declarations and definitions} |
169 | 181 |
|
|
2885 | 2897 |
|
2886 | 2898 | \pnum |
2887 | 2899 | \indextext{program}% |
| 2900 | +\indextext{translation unit}% |
2888 | 2901 | \indextext{linking}% |
2889 | 2902 | A \defn{program} consists of one or more translation units\iref{lex.phases} |
2890 | 2903 | linked together. A translation unit consists |
|
2896 | 2909 | \opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment} |
2897 | 2910 | \end{bnf} |
2898 | 2911 |
|
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 | | - |
2914 | 2912 | \pnum |
2915 | 2913 | \indextext{linkage!\idxcode{static} and}% |
2916 | 2914 | \indextext{\idxcode{static}!linkage of}% |
|
0 commit comments