Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.3 with respect to 0.0
#5
There is nothing in the MISRA-C:2004 rules that prevents your project defining an "effectively boolean type" as a double. However, the MISRA group would strongly recommend that you did not do this.

You are correct in saying that !3.7 will deliver an integer value of 0. However, for the purposes of some of the MISRA rules, the "!" is considered to return the MISRA "effectively boolean type".
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)