03-11-2010, 09:22 AM
The underlying type of the controlling expression of the switch statement is signed 8-bit.
Conversion of 1L from underlying long int to signed 8-bit violates Rule 10.1.
Conversion of 255 from underlying signed 16-bit to signed 8-bit also violates Rule 10.1.
This conversion is mentioned in Section 6.10.2 under the subsection Assigning Conversions. See also the Exemplar Suite file mc2_1001.c.
Conversion of 1L from underlying long int to signed 8-bit violates Rule 10.1.
Conversion of 255 from underlying signed 16-bit to signed 8-bit also violates Rule 10.1.
This conversion is mentioned in Section 6.10.2 under the subsection Assigning Conversions. See also the Exemplar Suite file mc2_1001.c.
Posted by and on behalf of the MISRA C Working Group