10-03-2010, 01:20 PM
Rules 10.x deal with arithmetic types only - they are not intended to deal with "Boolean" types.
Since C90 does not have a Boolean type it is, as you state, implemented as an int. Despite this, the intention of MISRA C is to treat Boolean types according to a different set of rules from the arithmetic types. Rule 12.6 (as amended by TC1) states which operations can be applied to objects with Boolean type.
Since C90 does not have a Boolean type it is, as you state, implemented as an int. Despite this, the intention of MISRA C is to treat Boolean types according to a different set of rules from the arithmetic types. Rule 12.6 (as amended by TC1) states which operations can be applied to objects with Boolean type.
Posted by and on behalf of the MISRA C Working Group