Skip to content

Commit 6b6b656

Browse files
jensmaurerzygoloid
authored andcommitted
[lex,cpp] Adjust index entries around 'macro' and 'point of'.
1 parent 403ea7d commit 6b6b656

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

source/basic.tex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,9 +815,12 @@
815815

816816
\rSec2[basic.scope.pdecl]{Point of declaration}
817817

818+
\indextext{declaration!point of|(}%
819+
818820
\pnum
819-
\indextext{name!point of declaration}%
820-
The \defn{point of declaration} for a name is immediately after its
821+
\indextext{name!point of declaration|see{declaration, point of}}%
822+
\indextext{point of!declaration|see{declaration, point of}}%
823+
The \defnx{point of declaration}{declaration!point of} for a name is immediately after its
821824
complete declarator\iref{dcl.decl} and before its
822825
\grammarterm{initializer} (if any), except as noted below. \begin{example}
823826

@@ -967,6 +970,7 @@
967970
For point of instantiation of a template, see~\ref{temp.point}.
968971
\end{note}
969972
\indextext{scope!declarations and|)}
973+
\indextext{declaration!point of|)}
970974

971975
\rSec2[basic.scope.block]{Block scope}
972976

source/preprocessor.tex

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@
671671

672672
\rSec1[cpp.import]{Header unit importation}
673673
\indextext{header unit!preprocessing}%
674-
\indextext{macro import|(}%
674+
\indextext{macro!import|(}%
675675

676676
\begin{bnf}
677677
\nontermdef{pp-import}\br
@@ -691,7 +691,8 @@
691691
instructs the preprocessor to import macros
692692
from the header unit\iref{module.import}
693693
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
695696
first two forms of \grammarterm{pp-import} is
696697
immediately after the \grammarterm{new-line} terminating
697698
the \grammarterm{pp-import}.
@@ -715,14 +716,15 @@
715716
\pnum
716717
Each \tcode{\#define} directive encountered when preprocessing
717718
each translation unit in a program results in a distinct
718-
\defn{macro definition}.
719+
\defnx{macro definition}{macro!definition}.
719720
Importing macros from a header unit makes macro definitions
720721
from a translation unit visible in other translation units.
721722
Each macro definition has at most one point of definition in
722723
each translation unit and at most one point of undefinition, as follows:
723724
\begin{itemize}
724725
\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}
726728
of a macro definition within a translation unit
727729
is the point at which its \tcode{\#define} directive occurs (in the translation
728730
unit containing the \tcode{\#define} directive), or,
@@ -733,7 +735,8 @@
733735
macro definition, if any (in any other translation unit).
734736

735737
\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}
737740
of a macro definition within a translation unit
738741
is the first point at which a \tcode{\#undef} directive naming the macro occurs
739742
after its point of definition, or the first point
@@ -742,7 +745,8 @@
742745
\end{itemize}
743746

744747
\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
746750
if it has a point of definition in that translation unit preceding the location,
747751
and does not have a point of undefinition in that translation unit preceding
748752
the location.
@@ -783,8 +787,7 @@
783787
int c = Z; // error: active macro definitions \#2 and \#3 are not valid redefinitions of \tcode{Z}
784788
\end{codeblocktu}
785789
\end{example}
786-
787-
\indextext{macro import|)}%
790+
\indextext{macro!import|)}
788791

789792
\rSec1[cpp.glob.frag]{Global module fragment}
790793

@@ -844,15 +847,13 @@
844847

845848
\pnum
846849
An identifier currently defined as an
847-
\indextext{object-like macro|see{macro, object-like}}%
848850
\indextext{macro!object-like}%
849851
object-like macro (see below) may be redefined by another
850852
\tcode{\#define}
851853
preprocessing directive provided that the second definition is an
852854
object-like macro definition and the two replacement lists
853855
are identical, otherwise the program is ill-formed.
854856
Likewise, an identifier currently defined as a
855-
\indextext{function-like macro|see{macro, function-like}}%
856857
\indextext{macro!function-like}%
857858
function-like macro (see below) may be redefined by another
858859
\tcode{\#define}
@@ -920,7 +921,7 @@
920921
\end{ncsimplebnf}
921922

922923
defines an
923-
\defnx{object-like macro}{macro!object-like} that
924+
\defnadj{object-like}{macro} that
924925
causes each subsequent instance of the macro name\footnote{Since, by macro-replacement time,
925926
all character literals and string literals are preprocessing tokens,
926927
not sequences possibly containing identifier-like subsequences
@@ -941,7 +942,7 @@
941942
\terminal{\# define} identifier lparen \terminal{...} \terminal{)} replacement-list new-line\br
942943
\terminal{\# define} identifier lparen identifier-list \terminal{, ...} \terminal{)} replacement-list new-line
943944
\end{ncsimplebnf}
944-
defines a \defnx{function-like macro}{macro!function-like}
945+
defines a \defnadj{function-like}{macro}
945946
with parameters, whose use is
946947
similar syntactically to a function call.
947948
The parameters

0 commit comments

Comments
 (0)