Skip to content

Commit

Permalink
[dcl.dcl][stmt.stmt] Remove tautonyms from top level stable labels
Browse files Browse the repository at this point in the history
Per comment on issue #5315.
Thanks to Jonathan Wakely for the notion of tautonyms.
  • Loading branch information
AlisdairM committed Oct 30, 2024
1 parent bf43925 commit 4f6c432
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
2 changes: 1 addition & 1 deletion source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
\indextext{declaration!definition versus}%
\indextext{declaration}%
\indextext{declaration!name}%
A declaration\iref{dcl.dcl} may (re)introduce
A declaration\iref{dcl} may (re)introduce
one or more names and/or entities into a translation
unit.
If so, the
Expand Down
18 changes: 9 additions & 9 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
\end{codeblock}
\end{example}

\rSec2[diff.cpp23.dcl.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.cpp23.dcl]{\ref{dcl}: declarations}

\diffref{dcl.init.list}
\change
Expand Down Expand Up @@ -359,7 +359,7 @@
\end{codeblock}
\end{example}

\rSec2[diff.cpp20.stmt]{\ref{stmt.stmt}: statements}
\rSec2[diff.cpp20.stmt]{\ref{stmt}: statements}

\diffref{stmt.ranged}
\change
Expand All @@ -383,7 +383,7 @@
\end{codeblock}
\end{example}

\rSec2[diff.cpp20.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.cpp20.dcl]{\ref{dcl}: declarations}

\diffref{dcl.init.string}
\change
Expand Down Expand Up @@ -850,7 +850,7 @@
if those entities are only referenced in contexts
that do not result in an odr-use.

\rSec2[diff.cpp17.dcl.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.cpp17.dcl]{\ref{dcl}: declarations}

\diffref{dcl.typedef}
\change
Expand Down Expand Up @@ -1489,7 +1489,7 @@
\tcode{::operator new(std::size_t, std::align_val_t)}
is used instead.

\rSec2[diff.cpp14.dcl.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.cpp14.dcl]{\ref{dcl}: declarations}

\diffref{dcl.stc}
\indextext{\idxcode{register} storage class}%
Expand Down Expand Up @@ -1875,7 +1875,7 @@
revision of \Cpp{}, it yields \tcode{sizeof(const char[1])}.
\end{example}

\rSec2[diff.cpp11.dcl.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.cpp11.dcl]{\ref{dcl}: declarations}

\diffref{dcl.constexpr}
\change
Expand Down Expand Up @@ -2117,7 +2117,7 @@
\end{codeblock}
\end{example}

\rSec2[diff.cpp03.dcl.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.cpp03.dcl]{\ref{dcl}: declarations}

\diffref{dcl.spec}
\change
Expand Down Expand Up @@ -2923,7 +2923,7 @@
\howwide
Rare.

\rSec2[diff.stat]{\ref{stmt.stmt}: statements}
\rSec2[diff.stmt]{\ref{stmt}: statements}

\diffref{stmt.switch,stmt.goto}
\change
Expand Down Expand Up @@ -2971,7 +2971,7 @@
For several years, many existing C implementations have produced warnings in
this case.

\rSec2[diff.dcl]{\ref{dcl.dcl}: declarations}
\rSec2[diff.dcl]{\ref{dcl}: declarations}

\diffref{dcl.stc}
\change
Expand Down
6 changes: 3 additions & 3 deletions source/declarations.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%!TEX root = std.tex
\rSec0[dcl.dcl]{Declarations}%
\rSec0[dcl]{Declarations}%
\indextext{declaration|(}

\gramSec[gram.dcl]{Declarations}
Expand Down Expand Up @@ -129,7 +129,7 @@
\indextext{scope}%
Certain declarations contain one or more scopes\iref{basic.scope.scope}.
Unless otherwise stated, utterances in
\ref{dcl.dcl} about components in, of, or contained by a
\ref{dcl} about components in, of, or contained by a
declaration or subcomponent thereof refer only to those components of
the declaration that are \emph{not} nested within scopes nested within
the declaration.
Expand Down Expand Up @@ -8838,7 +8838,7 @@
\pnum
Each \grammarterm{attribute-specifier-seq} is said to \defn{appertain} to some entity or
statement, identified by the syntactic context
where it appears\iref{stmt.stmt,dcl.dcl,dcl.decl}.
where it appears\iref{stmt,dcl,dcl.decl}.
If an \grammarterm{attribute-specifier-seq} that appertains to some
entity or statement contains an \grammarterm{attribute} or \grammarterm{alignment-specifier} that
is not allowed to apply to that
Expand Down
4 changes: 2 additions & 2 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@
\indextext{identifier}%
An \grammarterm{identifier} is only
an \grammarterm{id-expression} if it has
been suitably declared\iref{dcl.dcl}
been suitably declared\iref{dcl}
or if it appears as part of a \grammarterm{declarator-id}\iref{dcl.decl}.
An \grammarterm{identifier} that names a coroutine parameter
refers to the copy of the parameter\iref{dcl.fct.def.coroutine}.
Expand Down Expand Up @@ -7724,7 +7724,7 @@
\item
a \keyword{goto} statement\iref{stmt.goto}.
\begin{note}
A \keyword{goto} statement introduced by equivalence\iref{stmt.stmt}
A \keyword{goto} statement introduced by equivalence\iref{stmt}
is not in scope.
For example, a \keyword{while} statement\iref{stmt.while}
can be executed during constant evaluation.
Expand Down
4 changes: 2 additions & 2 deletions source/statements.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%!TEX root = std.tex
\rSec0[stmt.stmt]{Statements}%
\rSec0[stmt]{Statements}%
\indextext{statement|(}

\gramSec[gram.stmt]{Statements}
Expand Down Expand Up @@ -92,7 +92,7 @@
the \grammarterm{condition} is a structured binding declaration\iref{dcl.pre}.
A \grammarterm{condition} that is
neither an \grammarterm{expression} nor a structured binding declaration
is a declaration\iref{dcl.dcl}.
is a declaration\iref{dcl}.
The \grammarterm{declarator} shall not
specify a function or an array. The \grammarterm{decl-specifier-seq} shall not
define a class or enumeration. If the \keyword{auto} \grammarterm{type-specifier} appears in
Expand Down
11 changes: 11 additions & 0 deletions source/xrefdelta.tex
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,20 @@
\movedxref{stoptoken.cons}{stopsource}
\movedxref{stoptoken.nonmembers}{stopsource}

% https://github.com/cplusplus/draft/pull/7179
\movedxref{dcl.dcl}{dcl}
\movedxref{diff.cpp03.dcl.dcl}{diff.cpp03.dcl}
\movedxref{diff.cpp11.dcl.dcl}{diff.cpp11.dcl}
\movedxref{diff.cpp14.dcl.dcl}{diff.cpp14.dcl}
\movedxref{diff.cpp17.dcl.dcl}{diff.cpp17.dcl}
\movedxref{diff.cpp23.dcl.dcl}{diff.cpp23.dcl}
\movedxref{diff.stat}{diff.stmt}
\movedxref{stmt.stmt}{stmt}

% https://github.com/cplusplus/draft/pull/7345
\movedxref{basic.stc.inherit}{basic.stc.general}


%%% Deprecated features.
%%% Example:
%
Expand Down

0 comments on commit 4f6c432

Please sign in to comment.