[clang] Add check in SemaChecking for multiple unsequenced volatile accesses (PR #180955)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 24 07:11:08 PDT 2026


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

----------------
AaronBallman wrote:

Should this be diagnosed?

C2y 6.5.17.1p3: ... The side effect of updating the stored value of the left operand is sequenced after the value computations of the left and right operands. The evaluations of the operands are unsequenced.

This might be outside the scope of the PR, but it also applies to things like `v = v;` regardless of whether `v` is `volatile` or not.

https://github.com/llvm/llvm-project/pull/180955


More information about the cfe-commits mailing list