================

----------------
Seraphimt wrote:

The code `*func(&i, v) = v;` must cause warning for C and C++ before C++17:
lhs unsequenced rhs => 2 unsequenced read of v.
But non warning for C++17:
lhs sequenced before rhs.
I check and it work correct.

`v = v` don't unsequenced because "updating the stored value of the left 
operand is sequenced after the value computations of the left and right" => 
read v sequenced before write v.

https://github.com/llvm/llvm-project/pull/180955
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to