|
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 |
|
157 | 163 | refer to the same entity in these translation units depending on the |
158 | 164 | linkage\iref{basic.link} of the name specified in each |
159 | 165 | 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} |
160 | 172 |
|
161 | 173 | \rSec1[basic.def]{Declarations and definitions} |
162 | 174 |
|
|
2875 | 2887 |
|
2876 | 2888 | \pnum |
2877 | 2889 | \indextext{program}% |
| 2890 | +\indextext{translation unit}% |
2878 | 2891 | \indextext{linking}% |
2879 | 2892 | A \defn{program} consists of one or more translation units\iref{lex.separate} |
2880 | 2893 | linked together. A translation unit consists |
|
2886 | 2899 | \opt{global-module-fragment} module-declaration \opt{declaration-seq} \opt{private-module-fragment} |
2887 | 2900 | \end{bnf} |
2888 | 2901 |
|
2889 | | -\pnum |
2890 | | -\indextext{translation unit}% |
2891 | | -A name has |
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 | | - |
2904 | 2902 | \pnum |
2905 | 2903 | \indextext{linkage!\idxcode{static} and}% |
2906 | 2904 | \indextext{\idxcode{static}!linkage of}% |
|
0 commit comments