10-07-2025, 01:14 PM
x = x + 1 does not violate Rule 13.2 because the read contributes to the value of the write (amplification 3)... the same is true for x++
x = x + 1 (or x += 1 ) does not violate Rule 13.3, because that Rule explicitly only applies to ++ and --, and not to += or -=
x = x + 1 (or x += 1 ) does not violate Rule 13.3, because that Rule explicitly only applies to ++ and --, and not to += or -=
Posted by and on behalf of the MISRA C Working Group