/* >>>------------------------------------------------------------ * * File: rule_13.3.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 13.3 (Required): * Floating-point expressions shall not be tested for equality or * inequality. * * Implemented by message: * 3341 Comparing floating point expressions for equality (with * '==' or '!='). * * <<<------------------------------------------------------------ */ /* PRQA S 2982 ++ */ #include "misra.h" #include "m2cmex.h" extern S16 test_1303( void ) { S16 r = 0; if ( f64a == f64b ) /* MISRA Violation */ { r = 1; } if ( f64a != f64b ) /* MISRA Violation */ { r = -1; } bla = f64b == 1.0; /* MISRA Violation */ return r; }