Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rules 12.1 and 12.5 and unary operators
#4
When the MISRA-C:2004 guidelines were updated to MISRA C:2012 it was realised that there was no reason to maintain the difference between the unary operators. Rule 12.5 was removed and the requirement for parentheses is now covered only by 12.1. This means that postfix, unary and cast operands of && and || are permitted without brackets in MISRA C:2012.

If you are continuing to use MISRA-C:2004, then the justification for any deviation could include that this Rule has been relaxed for MISRA C:2012
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)