Abraxas/Misra Home  Table of Contents

Module - m16.html

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

Misra-C Test Suite for Module - m16.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 16: Required */

Rule 16: Required */

/* Underlying floating point bit representations should not be used. */

Underlying floating point bit representations should not be used. */

/* Not automatically enforceable. */

Not automatically enforceable. */
union utag {
float f1;   /*  define a float */
float fbit ;   /*  define a float bit */
unsigned long i1 : 1 ;
} u ;



Function Name: m16()

m16() {
	unsigned dummy;
	u.f1 = 1.0;
	dummy = u.i1 >> 31 ;	/*  don't grab bits from a float */
}

Abraxas/Misra Home  Table of Contents

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