Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 12.6
#2
This rule was clarified in technical corrigendum (TC1) and the wording is now:

Quote:The operands of logical operators (&&, || and !) should be effectively Boolean. Expressions that are effectively Boolean should not be used as operands to operators other than (&&, ||, !, =, ==, != and ?:)

According to this wording, your example:
Code:
if (TRUE==TRUE)
is not a violation of Rule 12.6.
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)