From 6bc3e6a469637fbdef20bb3317f144adb0066e55 Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Tue, 30 Jul 2024 11:08:32 -0400 Subject: [PATCH] [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. --- source/config.tex | 3 +++ source/expressions.tex | 2 +- source/intro.tex | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/config.tex b/source/config.tex index 4e4c9a5bc8..5007c99c79 100644 --- a/source/config.tex +++ b/source/config.tex @@ -8,6 +8,9 @@ %% Release date \newcommand{\reldate}{\today} +%% Core chapters +\newcommand{\lastcorechapter}{cpp} + %% Library chapters \newcommand{\firstlibchapter}{support} \newcommand{\lastlibchapter}{exec} diff --git a/source/expressions.tex b/source/expressions.tex index 3ee94afec2..e8664a3cc4 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7552,7 +7552,7 @@ \item an operation that would have undefined or erroneous behavior -as specified in \ref{intro} through \ref{cpp}, +as specified in \ref{intro} through \ref{\lastcorechapter}, excluding \ref{dcl.attr.assume} and \ref{dcl.attr.noreturn}; \begin{footnote} This includes, diff --git a/source/intro.tex b/source/intro.tex index 071856dc26..7a93f24be3 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -256,7 +256,7 @@ Implementations are allowed, but not required, to diagnose it\iref{intro.compliance.general}. Evaluation of a constant expression\iref{expr.const} -never exhibits behavior specified as erroneous in \ref{intro} through \ref{cpp}. +never exhibits behavior specified as erroneous in \ref{intro} through \ref{\lastcorechapter}. \end{defnote} \definition{expression-equivalent}{defns.expression.equivalent} @@ -644,7 +644,7 @@ issuance of a diagnostic message). Many incorrect program constructs do not engender undefined behavior; they are required to be diagnosed. Evaluation of a constant expression\iref{expr.const} never exhibits behavior explicitly -specified as undefined in \ref{intro} through \ref{cpp}. +specified as undefined in \ref{intro} through \ref{\lastcorechapter}. \end{defnote} \indexdefn{behavior!unspecified}% @@ -808,7 +808,7 @@ supports all the facilities described in this document, while a freestanding implementation supports the entire \Cpp{} language -described in \ref{lex} through \ref{cpp} and +described in \ref{lex} through \ref{\lastcorechapter} and the subset of the library facilities described in \ref{compliance}. \pnum @@ -958,7 +958,7 @@ \pnum \indextext{standard!structure of|(}% \indextext{standard!structure of}% -\ref{lex} through \ref{cpp} describe the \Cpp{} programming +\ref{lex} through \ref{\lastcorechapter} describe the \Cpp{} programming language. That description includes detailed syntactic specifications in a form described in~\ref{syntax}. For convenience, \ref{gram} repeats all such syntactic specifications.