Skip to content

Commit 35569a9

Browse files
burblebeetkoeppe
authored andcommitted
CWG2901 Unclear semantics for near-match aliased access
1 parent 4c2bc49 commit 35569a9

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

source/expressions.tex

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,12 @@
688688
\end{codeblock}
689689
\end{example}
690690

691-
\item Otherwise, the object indicated by the glvalue is read\iref{defns.access},
692-
and the value contained in the object is the prvalue result.
691+
\item Otherwise, the object indicated by the glvalue is read\iref{defns.access}.
692+
Let \tcode{V} be the value contained in the object.
693+
If \tcode{T} is an integer type,
694+
the prvalue result is
695+
the value of type \tcode{T} congruent\iref{basic.fundamental} to \tcode{V}, and
696+
\tcode{V} otherwise.
693697
\end{itemize}
694698

695699
\pnum
@@ -3807,8 +3811,8 @@
38073811
\indextext{operator!increment}%
38083812
\indextext{\idxcode{++}|see{operator, increment}}%
38093813
\indextext{postfix \tcode{++}}%
3810-
The value of a postfix \tcode{++} expression is the value of its
3811-
operand.
3814+
The value of a postfix \tcode{++} expression is the value obtained by
3815+
applying the lvalue-to-rvalue conversion\iref{conv.lval} to its operand.
38123816
\begin{note}
38133817
The value obtained is a copy of the original value.
38143818
\end{note}
@@ -7340,9 +7344,13 @@
73407344
\end{bnf}
73417345

73427346
\pnum
7343-
In simple assignment (\tcode{=}), the object referred to by the left operand
7344-
is modified\iref{defns.access}
7345-
by replacing its value with the result of the right operand.
7347+
In simple assignment (\tcode{=}),
7348+
let \tcode{V} be the result of the right operand;
7349+
the object referred to by the left operand is
7350+
modified\iref{defns.access} by replacing its value
7351+
with \tcode{V} or,
7352+
if the object is of integer type,
7353+
with the value congruent\iref{basic.fundamental} to \tcode{V}.
73467354

73477355
\pnum
73487356
\indextext{assignment!conversion by}%

0 commit comments

Comments
 (0)