Skip to content

Commit 877cd96

Browse files
committed
[config.tex] Create and apply macro to denote last core chapter
This PR should show no difference in the rendered document, but will make it much easier to refactor the Core clauses in the future --- just as we can refactor Library clauses today.
1 parent eac0893 commit 877cd96

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

source/config.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
%% Release date
99
\newcommand{\reldate}{\today}
1010

11+
%% Core chapters
12+
\newcommand{\firstcorechapter}{lex}
13+
\newcommand{\lastcorechapter}{cpp}
14+
1115
%% Library chapters
1216
\newcommand{\firstlibchapter}{support}
1317
\newcommand{\lastlibchapter}{exec}

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7552,7 +7552,7 @@
75527552

75537553
\item
75547554
an operation that would have undefined or erroneous behavior
7555-
as specified in \ref{intro} through \ref{cpp},
7555+
as specified in \ref{intro} through \ref{\lastcorechapter},
75567556
excluding \ref{dcl.attr.assume} and \ref{dcl.attr.noreturn};
75577557
\begin{footnote}
75587558
This includes,

source/intro.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
Implementations are allowed, but not required,
257257
to diagnose it\iref{intro.compliance.general}.
258258
Evaluation of a constant expression\iref{expr.const}
259-
never exhibits behavior specified as erroneous in \ref{intro} through \ref{cpp}.
259+
never exhibits behavior specified as erroneous in \ref{intro} through \ref{\lastcorechapter}.
260260
\end{defnote}
261261

262262
\definition{expression-equivalent}{defns.expression.equivalent}
@@ -644,7 +644,7 @@
644644
issuance of a diagnostic message). Many incorrect program constructs do
645645
not engender undefined behavior; they are required to be diagnosed.
646646
Evaluation of a constant expression\iref{expr.const} never exhibits behavior explicitly
647-
specified as undefined in \ref{intro} through \ref{cpp}.
647+
specified as undefined in \ref{intro} through \ref{\lastcorechapter}.
648648
\end{defnote}
649649

650650
\indexdefn{behavior!unspecified}%
@@ -722,7 +722,7 @@
722722
\begin{itemize}
723723
\item
724724
If a program contains no violations of the rules in
725-
\ref{lex} through \ref{\lastlibchapter} as well as those specified in \ref{depr},
725+
\ref{\firstcorechapter} through \ref{\lastlibchapter} as well as those specified in \ref{depr},
726726
a conforming implementation shall accept and correctly execute
727727
\begin{footnote}
728728
``Correct execution'' can include undefined behavior
@@ -808,7 +808,7 @@
808808
supports all the facilities described in this document, while
809809
a freestanding implementation
810810
supports the entire \Cpp{} language
811-
described in \ref{lex} through \ref{cpp} and
811+
described in \ref{\firstcorechapter} through \ref{\lastcorechapter} and
812812
the subset of the library facilities described in \ref{compliance}.
813813

814814
\pnum
@@ -958,7 +958,7 @@
958958
\pnum
959959
\indextext{standard!structure of|(}%
960960
\indextext{standard!structure of}%
961-
\ref{lex} through \ref{cpp} describe the \Cpp{} programming
961+
\ref{\firstcorechapter} through \ref{\lastcorechapter} describe the \Cpp{} programming
962962
language. That description includes detailed syntactic specifications in
963963
a form described in~\ref{syntax}. For convenience, \ref{gram}
964964
repeats all such syntactic specifications.

0 commit comments

Comments
 (0)