Abraxas/Misra Home  Table of Contents

Module - m103.html

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

Misra-C Test Suite for Module - m103.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 103: Required */

Rule 103: Required */

/* Relational operators shall not be applied to pointer types except */

Relational operators shall not be applied to pointer types except */

/* where both operands are of the same type and point to the same */

where both operands are of the same type and point to the same */

/* array, structure or union. */

array, structure or union. */
void
func103 ( void ) 



Function Name: func103()

{
    
int m[10] = {
        0,1,2,3,4,5,6,7,8,9 
    };
int n[10] = {
        0,1,2,3,4,5,6,7,8,9 
    };
    
int *pm, *pmm;
    
    pm = &m[1];
    pmm = &m[3];
    
    if ( pm < pmm ) 
    {
        
        
    }
    
    pmm = &n[3];
    
    if ( pm < pmm ) /*  RULE 103  */
    {
        
        
    }
    
}

Abraxas/Misra Home  Table of Contents

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