|
27 | 27 | \pnum
|
28 | 28 | \indextext{conventions!lexical|(}%
|
29 | 29 | \indextext{compilation!separate|(}%
|
| 30 | +\indextext{program}% |
| 31 | +A \defn{program} consists of one or more translation units\iref{lex.phases} |
| 32 | +linked together. |
30 | 33 | The text of the program is kept in units called
|
31 | 34 | \defnx{source files}{source file} in this document.
|
| 35 | + |
| 36 | +\pnum |
32 | 37 | A source file together with all the headers\iref{headers}
|
33 | 38 | and source files included\iref{cpp.include} via the preprocessing
|
34 | 39 | directive \tcode{\#include}, less any source lines skipped by any of the
|
|
40 | 45 | \begin{note}
|
41 | 46 | A \Cpp{} program need not all be translated at the same time.
|
42 | 47 | Translation units can be separately translated and then later linked
|
43 |
| -to produce an executable program\iref{basic.link}. |
| 48 | +to produce an executable program. |
44 | 49 | \end{note}
|
45 | 50 | \indextext{compilation!separate|)}
|
46 | 51 |
|
|
174 | 179 | Whitespace characters separating tokens are no longer significant.
|
175 | 180 | The resulting tokens constitute a \defn{translation unit} and
|
176 | 181 | are syntactically and
|
177 |
| -semantically analyzed as a \grammarterm{translation-unit}\iref{basic.link} and |
| 182 | +semantically analyzed as a \grammarterm{translation-unit}\iref{module.unit} and |
178 | 183 | translated.
|
179 | 184 | \begin{note}
|
180 | 185 | The process of analyzing and translating the tokens can occasionally
|
|
200 | 205 | \end{note}
|
201 | 206 | \begin{note}
|
202 | 207 | Previously translated translation units can be preserved individually or in libraries.
|
203 |
| -The separate translation units of a program communicate\iref{basic.link} by (for example) |
204 |
| -calls to functions whose identifiers have external or module linkage, |
| 208 | +The separate translation units of a program communicate by (for example) |
| 209 | +calls to functions whose identifiers have external or module linkage\iref{basic.link}, |
205 | 210 | manipulation of objects whose identifiers have external or module linkage, or
|
206 | 211 | manipulation of data files.
|
207 | 212 | \end{note}
|
|
0 commit comments