K
Kaz Kylheku
No.
The side effects of the increment operator
are not needed for the dataflow dependency.
That is true in general, but not in this specific expression.
The key here is that the comma operator imposes the side effect barrier.
The value of the right operand of the assignment operator
can be calculated without any side effects taking place;
It will be equal to (i + 2).
You are gapingly overlooking the fact that algebraic evaluation
shortcuts are optimizations which are only permitted if they don't break
the abstract semantics.
Sequence points are only defined by
when the side effects of an evaluation take place,
not the data calculations.
That is false. A sequence point establishes not only that prior side
effects have settled, but that the next evaluation has not yet started.
I.e. if the prior evaluation has the side effect of modifying X, and the
next evaluation accesses X (a data calculation), then this means that
the side effect of X is settled, and the next evaluation will use the
new, updated, stable value of X.
(p = p -> next = q)
means the exact same thing as
(p = (p -> next = q))
But the side effect of evaluating (p -> next = q)
does not have to take place before the update of p.
This is different because no operator is used in this expression which
has sequencing properties.
Since it does not contain any, this example you have given can be used
to neither support nor refute any of your claims about the properties of
sequence points.