Abraxas/Misra Home  Table of Contents

Module - m110.html

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

Misra-C Test Suite for Module - m110.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 110: Required */

Rule 110: Required */

/* Unions shall not be used to access the sub-parts of larger data */

Unions shall not be used to access the sub-parts of larger data */

/* types. */

types. */

/* This seems slightly odd as Rule 109 effectively precludes the use */

This seems slightly odd as Rule 109 effectively precludes the use */

/* of unions at all. */

of unions at all. */
#include "misra.h"
union u
{
    
FL_32 f;
SI_16 s;
} un; /*  RULE 110  */
static void
func110 ( void ) 



Function Name: func110()

{
    
FL_32 f = 1.1f;
SI_16 s;
    
    un.f = f;
    s = un.s;
    
}

Abraxas/Misra Home  Table of Contents

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