Abraxas/Misra Home  Table of Contents

Module - m50.html

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.

Misra-C Test Suite for Module - m50.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 50: Required */

Rule 50: Required */

/* Floating point variables shall not be tested for exact equality or */

Floating point variables shall not be tested for exact equality or */

/* inequality. */

inequality. */
#include "misra.h"
SI_32
rule50 ( void ) 



Function Name: rule50()

{
    
SI_32 c = 3;
    
FL_32 f = 0.1234f;
FL_32 g = 0.1234f;
    
    if ( f == g ) /*  RULE 50  */
    {
        
        c = 1;
        
    }
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.