Abraxas/Misra Home  Table of Contents

Module - m98.html

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

Misra-C Test Suite for Module - m98.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 98: Required */

Rule 98: Required */

/* At most one of # or ## in a single macro definition */

At most one of # or ## in a single macro definition */
#include "misra.h"
#define CONCAT2 ( x,y ) ( x ## y ) 
#define CONCAT3 ( x,y,z ) ( x ## y ## z ) /*  RULE 98  */
#define STRINGS ( x,y ) #x ## #y /*  RULE 98  */
void
func98 ( void ) 



Function Name: func98()

{
    
SC_8 msg1[] = CONCAT2 ( "Hello", "World" ) ;

/* SC_8 msg2[] = STRINGS ( Hello, World ) ; */

SC_8 msg2[] = STRINGS ( Hello, World ) ; */
SI_32 i = CONCAT3 ( 1,2,3 ) ;
SI_32 j = CONCAT2 ( 1,2 ) ;
    
}

Abraxas/Misra Home  Table of Contents

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