09-12-2016, 08:43 AM
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
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