The assignment operator (=
) and the compound assignment
operators all group right-to-left.
require a modifiable lvalue as their left operand; their result is an lvalue
referring to the left operand.
The result in all cases is a bit-field if
the left operand is a bit-field.
In all cases, the assignment is
sequenced after the
value computation of the right and left operands,
and before the
value computation of the assignment expression.
The right operand is sequenced before the left operand.
respect to an indeterminately-sequenced function call, the operation of
a compound assignment is a single evaluation.
Therefore, a function call cannot intervene between the
lvalue-to-rvalue conversion and the side effect associated with any
single compound assignment operator.
— end note
The behavior of an expression of the form E1 op= E2
is equivalent to E1 = E1 op E2
is evaluated only once.
shall either have arithmetic type or be a pointer to a
possibly cv-qualified completely-defined object type.
In all other
shall have arithmetic type.