From 34083d21d13c610ffb96101bad88c5a787d3d489 Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Sun, 29 Dec 2024 11:53:54 +0700 Subject: [PATCH] [expr.ass] Rename problematic stable label As more folks from outside the technically focused WG21 committee pay attention to our standard, some language starts to gain attention as problematic. This commit fixes one such case. --- source/basic.tex | 6 +++--- source/classes.tex | 2 +- source/compatibility.tex | 2 +- source/declarations.tex | 8 ++++---- source/expressions.tex | 10 +++++----- source/future.tex | 2 +- source/intro.tex | 2 +- source/overloading.tex | 2 +- source/xrefdelta.tex | 3 +++ 9 files changed, 20 insertions(+), 17 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index c1873fb077..b7ee673459 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -674,7 +674,7 @@ is defined\iref{basic.def} or called\iref{expr.call}, or \item a class with a base class of type \tcode{T} is defined\iref{class.derived}, or -\item an lvalue of type \tcode{T} is assigned to\iref{expr.ass}, or +\item an lvalue of type \tcode{T} is assigned to\iref{expr.assign}, or \item the type \tcode{T} is the subject of an \keyword{alignof} expression\iref{expr.alignof}, or \item an \grammarterm{exception-declaration} has type \tcode{T}, reference to @@ -3907,7 +3907,7 @@ \end{itemize} If no initialization is performed for an object (including subobjects), such a byte retains its initial value -until that value is replaced\iref{dcl.init.general,expr.ass}. +until that value is replaced\iref{dcl.init.general,expr.assign}. If any bit in the value representation has an indeterminate value, the object has an indeterminate value; otherwise, if any bit in the value representation has an erroneous value, @@ -3949,7 +3949,7 @@ If an indeterminate or erroneous value of unsigned ordinary character type or \tcode{std::byte} type is produced by the evaluation of - the right operand of a simple assignment operator\iref{expr.ass} + the right operand of a simple assignment operator\iref{expr.assign} whose first operand is an lvalue of unsigned ordinary character type or \tcode{std::byte} type, an indeterminate value or that erroneous value, respectively, replaces diff --git a/source/classes.tex b/source/classes.tex index 18838fd601..87202a0341 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -3117,7 +3117,7 @@ Otherwise, $S(\mathtt{E})$ is empty. \end{itemize} In an assignment expression of the form \tcode{E1 = E2} -that uses either the built-in assignment operator\iref{expr.ass} +that uses either the built-in assignment operator\iref{expr.assign} or a trivial assignment operator\iref{class.copy.assign}, for each element \tcode{X} of $S($\tcode{E1}$)$ and each anonymous union member \tcode{X}\iref{class.union.anon} that diff --git a/source/compatibility.tex b/source/compatibility.tex index 23ba5e4f8d..59451b525c 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -2969,7 +2969,7 @@ \howwide Rare. -\diffref{expr.cond,expr.ass,expr.comma} +\diffref{expr.cond,expr.assign,expr.comma} \indextext{conversion!lvalue-to-rvalue}% \indextext{rvalue!lvalue conversion to}% \indextext{lvalue}% diff --git a/source/declarations.tex b/source/declarations.tex index 7cbe7fb501..88da5c1149 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1277,7 +1277,7 @@ \pnum \indextext{const object!undefined change to}% -Any attempt to modify\iref{expr.ass,expr.post.incr,expr.pre.incr} a +Any attempt to modify\iref{expr.assign,expr.post.incr,expr.pre.incr} a const object\iref{basic.type.qualifier} during its lifetime\iref{basic.life} results in undefined behavior. \begin{example} @@ -3007,7 +3007,7 @@ \end{example} \pnum -See also~\ref{expr.ass} and~\ref{dcl.init}. +See also~\ref{expr.assign} and~\ref{dcl.init}. \pnum \begin{note} @@ -5684,7 +5684,7 @@ A reference cannot be changed to refer to another object after initialization. \indextext{assignment!reference}% \begin{note} -Assignment to a reference assigns to the object referred to by the reference\iref{expr.ass}. +Assignment to a reference assigns to the object referred to by the reference\iref{expr.assign}. \end{note} \indextext{argument passing!reference and}% Argument passing\iref{expr.call} @@ -5939,7 +5939,7 @@ \item as an argument to a constructor invocation\iref{dcl.init,expr.type.conv}, \item as an initializer for a non-static data member\iref{class.mem}, \item in a \grammarterm{mem-initializer}\iref{class.base.init}, or -\item on the right-hand side of an assignment\iref{expr.ass}. +\item on the right-hand side of an assignment\iref{expr.assign}. \end{itemize} \begin{example} diff --git a/source/expressions.tex b/source/expressions.tex index 9589921d5b..7005998856 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -131,7 +131,7 @@ \begin{footnote} The cast and assignment operators must still perform their specific conversions as described in~\ref{expr.type.conv}, \ref{expr.cast}, -\ref{expr.static.cast} and~\ref{expr.ass}. +\ref{expr.static.cast} and~\ref{expr.assign}. \end{footnote} \rSec1[expr.prop]{Properties of expressions} @@ -297,7 +297,7 @@ \begin{note} A program that attempts to modify an object through a nonmodifiable lvalue or through an rvalue -is ill-formed\iref{expr.ass,expr.post.incr,expr.pre.incr}. +is ill-formed\iref{expr.assign,expr.post.incr,expr.pre.incr}. \end{note} \pnum @@ -4864,7 +4864,7 @@ An operand with volatile-qualified type is deprecated; see~\ref{depr.volatile.type}. The expression \tcode{++x} is otherwise equivalent to \tcode{x+=1} and -the expression \tcode{--x} is otherwise equivalent to \tcode{x-=1}\iref{expr.ass}. +the expression \tcode{--x} is otherwise equivalent to \tcode{x-=1}\iref{expr.assign}. \begin{note} For postfix increment and decrement, see~\ref{expr.post.incr}. \end{note} @@ -7296,7 +7296,7 @@ \end{codeblock} \end{example} -\rSec2[expr.ass]{Assignment and compound assignment operators}% +\rSec2[expr.assign]{Assignment and compound assignment operators}% \indextext{expression!assignment and compound assignment} \pnum @@ -7827,7 +7827,7 @@ a \keyword{reinterpret_cast}\iref{expr.reinterpret.cast}; \item -a modification of an object\iref{expr.ass,expr.post.incr,expr.pre.incr} +a modification of an object\iref{expr.assign,expr.post.incr,expr.pre.incr} unless it is applied to a non-volatile lvalue of literal type that refers to a non-volatile object whose lifetime began within the evaluation of $E$; diff --git a/source/future.tex b/source/future.tex index 1abc48bc00..d3430ee524 100644 --- a/source/future.tex +++ b/source/future.tex @@ -73,7 +73,7 @@ \pnum Certain assignments where the left operand is a volatile-qualified non-class type -are deprecated; see~\ref{expr.ass}. +are deprecated; see~\ref{expr.assign}. \begin{example} \begin{codeblock} diff --git a/source/intro.tex b/source/intro.tex index d5cb23dc23..574e1ca10a 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -92,7 +92,7 @@ Only glvalues of scalar type can be used to access objects. Reads of scalar objects are described in \ref{conv.lval} and modifications of scalar objects are described in -\ref{expr.ass}, \ref{expr.post.incr}, and \ref{expr.pre.incr}. +\ref{expr.assign}, \ref{expr.post.incr}, and \ref{expr.pre.incr}. Attempts to read or modify an object of class type typically invoke a constructor\iref{class.ctor} or assignment operator\iref{class.copy.assign}; diff --git a/source/overloading.tex b/source/overloading.tex index cf7d80931c..0aaf4edfe5 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -3093,7 +3093,7 @@ \item an object or reference being initialized\iref{dcl.init,dcl.init.ref,dcl.init.list}, \item -the left side of an assignment\iref{expr.ass}, +the left side of an assignment\iref{expr.assign}, \item a parameter of a function\iref{expr.call}, \item diff --git a/source/xrefdelta.tex b/source/xrefdelta.tex index 6484384dc1..4b2e671ddf 100644 --- a/source/xrefdelta.tex +++ b/source/xrefdelta.tex @@ -101,6 +101,9 @@ % https://github.com/cplusplus/draft/pull/7345 \movedxref{basic.stc.inherit}{basic.stc.general} +% https://github.com/cplusplus/draft/pull/7524 +\movedxref{expr.ass}{expr.assign} + %%% Deprecated features. %%% Example: %