Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Was something missed for 12.6 about "?:"?
#1
The wording of advisory #12.6 indicates expressions other than effectively boolean ones are permitted as the conditional argument to "?:". Was this wording an oversight? In three other circumstances, the guidelines insist on effectively boolean expressions and it seems unintuitive to not require such in this case as well.
Reply
#2
It is intended that the first operand of the ternary operator should be effectively Boolean. This will be made clear in a future revision of the MISRA C Guidelines.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)