From fd62420789a972871184be61520ba76869231e4e 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 macros to denote first and last core chapters 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 | 4 ++++ source/expressions.tex | 2 +- source/intro.tex | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/source/config.tex b/source/config.tex index 50adcc3a99..09d2951bac 100644 --- a/source/config.tex +++ b/source/config.tex @@ -8,6 +8,10 @@ %% Release date \newcommand{\reldate}{\today} +%% Library chapters +\newcommand{\firstcorechapter}{lex} +\newcommand{\lastcorechapter}{cpp} + %% Library chapters \newcommand{\firstlibchapter}{support} \newcommand{\lastlibchapter}{exec} diff --git a/source/expressions.tex b/source/expressions.tex index ba0cd3f76d..0a04b0f143 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7540,7 +7540,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 4f2984457d..743638b8eb 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}% @@ -722,7 +722,7 @@ \begin{itemize} \item If a program contains no violations of the rules in -\ref{lex} through \ref{\lastlibchapter} as well as those specified in \ref{depr}, +\ref{\firstcorechapter} through \ref{\lastlibchapter} as well as those specified in \ref{depr}, a conforming implementation shall accept and correctly execute \begin{footnote} ``Correct execution'' can include undefined behavior @@ -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{\firstcorechapter} 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{\firstcorechapter} 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.