Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 12.5: OR sequence without parentheses not compliant?
#3
The last sentence of the first paragraph of Rule 12.5 reads:
Quote:Where an expression consists of either a sequence of only logical && or a sequence of only logical || , extra parentheses are not required.

Therefore the code is compliant with Rule 12.5.

Your tool appears to be checking correctly against the headline rule (the extra parentheses make the right operand of the first || into a primary expression) but has not taken the whole text of the rule into account.
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)