|
1 | 1 | %!TEX root = std.tex
|
2 | 2 | \rSec0[cpp]{Preprocessing directives}%
|
3 |
| -\indextext{preprocessing directives|(} |
| 3 | +\indextext{preprocessing directive|(} |
4 | 4 |
|
5 |
| -\indextext{compiler control line|see{preprocessing directives}}% |
6 |
| -\indextext{control line|see{preprocessing directives}}% |
7 |
| -\indextext{directive, preprocessing|see{preprocessing directives}} |
| 5 | +\indextext{compiler control line|see{preprocessing directive}}% |
| 6 | +\indextext{control line|see{preprocessing directive}}% |
| 7 | +\indextext{directive, preprocessing|see{preprocessing directive}} |
8 | 8 |
|
9 | 9 | \gramSec[gram.cpp]{Preprocessing directives}
|
10 | 10 |
|
|
163 | 163 | include other source files,
|
164 | 164 | and replace macros.
|
165 | 165 | These capabilities are called
|
166 |
| -\term{preprocessing}, |
| 166 | +\defn{preprocessing}, |
167 | 167 | because conceptually they occur
|
168 | 168 | before translation of the resulting translation unit.
|
169 | 169 |
|
|
379 | 379 | Their conditions are equivalent to
|
380 | 380 | \tcode{\#if}
|
381 | 381 | \tcode{defined}
|
382 |
| -\term{identifier} |
| 382 | +\grammarterm{identifier} |
383 | 383 | and
|
384 | 384 | \tcode{\#if}
|
385 | 385 | \tcode{!defined}
|
386 |
| -\term{identifier} |
| 386 | +\grammarterm{identifier} |
387 | 387 | respectively.
|
388 | 388 |
|
389 | 389 | \pnum
|
|
440 | 440 | \end{example}
|
441 | 441 |
|
442 | 442 | \rSec1[cpp.include]{Source file inclusion}
|
443 |
| -\indextext{preprocessing directives!header inclusion} |
444 |
| -\indextext{preprocessing directives!source-file inclusion} |
| 443 | +\indextext{preprocessing directive!header inclusion} |
| 444 | +\indextext{preprocessing directive!source-file inclusion} |
445 | 445 | \indextext{inclusion!source file|see{preprocessing directives, source-file inclusion}}%
|
446 | 446 | \indextext{\idxcode{\#include}}%
|
447 | 447 |
|
|
583 | 583 | \rSec1[cpp.replace]{Macro replacement}%
|
584 | 584 | \indextext{macro!replacement|(}%
|
585 | 585 | \indextext{replacement!macro|see{macro, replacement}}%
|
586 |
| -\indextext{preprocessing directives!macro replacement|see{macro, replacement}} |
| 586 | +\indextext{preprocessing directive!macro replacement|see{macro, replacement}} |
587 | 587 |
|
588 | 588 | \pnum
|
589 | 589 | \indextext{macro!replacement list}%
|
|
644 | 644 | The identifier immediately following the
|
645 | 645 | \tcode{define}
|
646 | 646 | is called the
|
647 |
| -\indextext{macro!name}% |
648 | 647 | \indextext{name!macro|see{macro, name}}%
|
649 |
| -\term{macro name}. |
| 648 | +\defnx{macro name}{macro!name}. |
650 | 649 | There is one name space for macro names.
|
651 | 650 | Any white-space characters preceding or following the
|
652 | 651 | replacement list of preprocessing tokens are not considered
|
|
735 | 734 | If there is a \tcode{...} immediately preceding the \tcode{)} in the
|
736 | 735 | function-like macro
|
737 | 736 | definition, then the trailing arguments (if any), including any separating comma preprocessing
|
738 |
| -tokens, are merged to form a single item: the \term{variable arguments}. The number of |
| 737 | +tokens, are merged to form a single item: the \defn{variable arguments}. The number of |
739 | 738 | arguments so combined is such that, following merger, the number of arguments is
|
740 | 739 | either equal to or
|
741 | 740 | one more than the number of parameters in the macro definition (excluding the
|
|
1177 | 1176 | \indextext{macro!replacement|)}
|
1178 | 1177 |
|
1179 | 1178 | \rSec1[cpp.line]{Line control}%
|
1180 |
| -\indextext{preprocessing directives!line control}% |
| 1179 | +\indextext{preprocessing directive!line control}% |
1181 | 1180 | \indextext{\idxcode{\#line}|see{preprocessing directives, line control}}
|
1182 | 1181 |
|
1183 | 1182 | \pnum
|
|
1188 | 1187 |
|
1189 | 1188 | \pnum
|
1190 | 1189 | The
|
1191 |
| -\term{line number} |
| 1190 | +\defn{line number} |
1192 | 1191 | of the current source line is one greater than
|
1193 | 1192 | the number of new-line characters read or introduced
|
1194 | 1193 | in translation phase 1\iref{lex.phases}
|
|
1239 | 1238 | otherwise, the result is processed as appropriate.
|
1240 | 1239 |
|
1241 | 1240 | \rSec1[cpp.error]{Error directive}%
|
1242 |
| -\indextext{preprocessing directives!error}% |
| 1241 | +\indextext{preprocessing directive!error}% |
1243 | 1242 | \indextext{\idxcode{\#error}|see{preprocessing directives, error}}
|
1244 | 1243 |
|
1245 | 1244 | \pnum
|
|
1254 | 1253 | and renders the program ill-formed.
|
1255 | 1254 |
|
1256 | 1255 | \rSec1[cpp.pragma]{Pragma directive}%
|
1257 |
| -\indextext{preprocessing directives!pragma}% |
| 1256 | +\indextext{preprocessing directive!pragma}% |
1258 | 1257 | \indextext{\idxcode{\#pragma}|see{preprocessing directives, pragma}}
|
1259 | 1258 |
|
1260 | 1259 | \pnum
|
|
1271 | 1270 | Any pragma that is not recognized by the implementation is ignored.
|
1272 | 1271 |
|
1273 | 1272 | \rSec1[cpp.null]{Null directive}%
|
1274 |
| -\indextext{preprocessing directives!null} |
| 1273 | +\indextext{preprocessing directive!null} |
1275 | 1274 |
|
1276 | 1275 | \pnum
|
1277 | 1276 | A preprocessing directive of the form
|
|
1430 | 1429 | \terminal{_Pragma} \terminal{(} string-literal \terminal{)}
|
1431 | 1430 | \end{ncbnf}
|
1432 | 1431 |
|
1433 |
| -is processed as follows: The string literal is \term{destringized} |
| 1432 | +is processed as follows: The string literal is \defnx{destringized}{destringization} |
1434 | 1433 | by deleting the \tcode{L} prefix, if present, deleting the leading and trailing
|
1435 | 1434 | double-quotes, replacing each escape sequence \tcode{\textbackslash"} by a double-quote, and
|
1436 | 1435 | replacing each escape sequence \tcode{\textbackslash\textbackslash} by a single
|
|
1457 | 1456 | LISTING( ..\listing.dir )
|
1458 | 1457 | \end{codeblock}
|
1459 | 1458 | \end{example}%
|
1460 |
| -\indextext{preprocessing directives|)} |
| 1459 | +\indextext{preprocessing directive|)} |
0 commit comments