Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
12.4, reading volatile side effect
#4
Rule 12.4 does not permit side-effects in the right hand operand of a logical operator or in the 2nd and 3rd operands of a conditional operator. The reason for this restriction is that the side-effect may or may not occur.

The method suggested by the previous poster is compliant with Rule 12.4 because the side-effect always occurs.
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)