25-06-2015, 07:36 AM
The rules in section 11 cover the implicit and explicit conversions that are permitted by the C standard. It does not matter whether these conversions occurring in an assigning context ( fp2 = fp1 ) or a balancing context ( fp2 == fp1 ).
Therefore the compliance of your examples are as follows:
Therefore the compliance of your examples are as follows:
Code:
fp2 == fp1; /* Not-compliant */
fp2 != 0x8000; /* Not-compliant */
if ( fp2 != NULL ) /* Compliant - exception 1 on NULL */
Posted by and on behalf of the MISRA C Working Group