30-03-2009, 10:23 AM
The use of a single bit is illogical on a target adopting two’s complement representation. The intention of the programmer may have been to allow for values of -1 and +1 (as well as zero), but such data values clearly require at least 2 bits (which in turn actually provides a range of -2 to +1). The ISO C standard does not define the required behaviour for a signed bit field of length 1.
Tracker ID: 17
Tracker ID: 17
Posted by and on behalf of the MISRA C Working Group