Skip to content

Commit

Permalink
[config.tex] Create and apply macros to denote first and last core ch…
Browse files Browse the repository at this point in the history
…apters

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.
  • Loading branch information
AlisdairM committed Jul 30, 2024
1 parent 9b3d01e commit fd62420
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions source/config.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions source/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}%
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit fd62420

Please # to comment.