/* >>>------------------------------------------------------------ * * File: rule_12.12.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 12.12 (Required): * The underlying bit representations of floating-point values * shall not be used. * * Implemented by message: * 3629 Union contains member of floating type. * * <<<------------------------------------------------------------ */ #include "misra.h" #include "m2cmex.h" #define FC (5.0F) extern S16 test_1212( void ) { union utag /* MISRA Violation - Rule 18.4 */ { F32 a; /* MISRA Violation */ U32 b; } un; /* MISRA Violation - Rule 18.4 */ un.a = FC; u32a = un.b & 0x000000FFUL ; return 1; }