Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.3 incr/decr op with volatile
#6
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 -=
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)