Was something missed for 12.6 about "?:"?
Moderators: misra-c, david ward
-
- Posts: 87
- Joined: Thu Nov 18, 2004 1:39 am
Was something missed for 12.6 about "?:"?
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.
-
- Posts: 572
- Joined: Thu Jan 05, 2006 1:11 pm
Re: Was something missed for 12.6 about "?:"?
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
Posted by and on behalf of
the MISRA C Working Group