|
671 | 671 |
|
672 | 672 | \rSec1[cpp.import]{Header unit importation}
|
673 | 673 | \indextext{header unit!preprocessing}%
|
674 |
| -\indextext{macro import|(}% |
| 674 | +\indextext{macro!import|(}% |
675 | 675 |
|
676 | 676 | \begin{bnf}
|
677 | 677 | \nontermdef{pp-import}\br
|
|
691 | 691 | instructs the preprocessor to import macros
|
692 | 692 | from the header unit\iref{module.import}
|
693 | 693 | denoted by the \grammarterm{header-name}.
|
694 |
| -The \defnadj{point of}{macro import} for the |
| 694 | +\indextext{point of!macro import|see{macro, point of import}}% |
| 695 | +The \defnx{point of macro import}{macro!point of import} for the |
695 | 696 | first two forms of \grammarterm{pp-import} is
|
696 | 697 | immediately after the \grammarterm{new-line} terminating
|
697 | 698 | the \grammarterm{pp-import}.
|
|
715 | 716 | \pnum
|
716 | 717 | Each \tcode{\#define} directive encountered when preprocessing
|
717 | 718 | each translation unit in a program results in a distinct
|
718 |
| -\defn{macro definition}. |
| 719 | +\defnx{macro definition}{macro!definition}. |
719 | 720 | Importing macros from a header unit makes macro definitions
|
720 | 721 | from a translation unit visible in other translation units.
|
721 | 722 | Each macro definition has at most one point of definition in
|
722 | 723 | each translation unit and at most one point of undefinition, as follows:
|
723 | 724 | \begin{itemize}
|
724 | 725 | \item
|
725 |
| -The \defnx{point of definition}{macro definition!point of definition} |
| 726 | +\indextext{point of!macro definition|see{macro, point of definition}}% |
| 727 | +The \defnx{point of definition}{macro!point of definition} |
726 | 728 | of a macro definition within a translation unit
|
727 | 729 | is the point at which its \tcode{\#define} directive occurs (in the translation
|
728 | 730 | unit containing the \tcode{\#define} directive), or,
|
|
733 | 735 | macro definition, if any (in any other translation unit).
|
734 | 736 |
|
735 | 737 | \item
|
736 |
| -The \defnx{point of undefinition}{macro definition!point of undefinition} |
| 738 | +\indextext{point of!macro undefinition|see{macro, point of undefinition}}% |
| 739 | +The \defnx{point of undefinition}{macro!point of undefinition} |
737 | 740 | of a macro definition within a translation unit
|
738 | 741 | is the first point at which a \tcode{\#undef} directive naming the macro occurs
|
739 | 742 | after its point of definition, or the first point
|
|
742 | 745 | \end{itemize}
|
743 | 746 |
|
744 | 747 | \pnum
|
745 |
| -A macro directive is \defnx{active}{macro definition!active} at a source location |
| 748 | +\indextext{active macro directive|see{macro, active}}% |
| 749 | +A macro directive is \defnx{active}{macro!active} at a source location |
746 | 750 | if it has a point of definition in that translation unit preceding the location,
|
747 | 751 | and does not have a point of undefinition in that translation unit preceding
|
748 | 752 | the location.
|
|
783 | 787 | int c = Z; // error: active macro definitions \#2 and \#3 are not valid redefinitions of \tcode{Z}
|
784 | 788 | \end{codeblocktu}
|
785 | 789 | \end{example}
|
786 |
| - |
787 |
| -\indextext{macro import|)}% |
| 790 | +\indextext{macro!import|)} |
788 | 791 |
|
789 | 792 | \rSec1[cpp.glob.frag]{Global module fragment}
|
790 | 793 |
|
|
844 | 847 |
|
845 | 848 | \pnum
|
846 | 849 | An identifier currently defined as an
|
847 |
| -\indextext{object-like macro|see{macro, object-like}}% |
848 | 850 | \indextext{macro!object-like}%
|
849 | 851 | object-like macro (see below) may be redefined by another
|
850 | 852 | \tcode{\#define}
|
851 | 853 | preprocessing directive provided that the second definition is an
|
852 | 854 | object-like macro definition and the two replacement lists
|
853 | 855 | are identical, otherwise the program is ill-formed.
|
854 | 856 | Likewise, an identifier currently defined as a
|
855 |
| -\indextext{function-like macro|see{macro, function-like}}% |
856 | 857 | \indextext{macro!function-like}%
|
857 | 858 | function-like macro (see below) may be redefined by another
|
858 | 859 | \tcode{\#define}
|
|
920 | 921 | \end{ncsimplebnf}
|
921 | 922 |
|
922 | 923 | defines an
|
923 |
| -\defnx{object-like macro}{macro!object-like} that |
| 924 | +\defnadj{object-like}{macro} that |
924 | 925 | causes each subsequent instance of the macro name\footnote{Since, by macro-replacement time,
|
925 | 926 | all character literals and string literals are preprocessing tokens,
|
926 | 927 | not sequences possibly containing identifier-like subsequences
|
|
941 | 942 | \terminal{\# define} identifier lparen \terminal{...} \terminal{)} replacement-list new-line\br
|
942 | 943 | \terminal{\# define} identifier lparen identifier-list \terminal{, ...} \terminal{)} replacement-list new-line
|
943 | 944 | \end{ncsimplebnf}
|
944 |
| -defines a \defnx{function-like macro}{macro!function-like} |
| 945 | +defines a \defnadj{function-like}{macro} |
945 | 946 | with parameters, whose use is
|
946 | 947 | similar syntactically to a function call.
|
947 | 948 | The parameters
|
|
0 commit comments