/* >>>------------------------------------------------------------ * * File: rule_19.9.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 19.9 (Required): * Arguments to a function-like macro shall not contain tokens * that look like preprocessing directives. * * Implemented by message: * 853 [U] Macro arguments contain a sequence of tokens that * has the form of a preprocessing directive. * * <<<------------------------------------------------------------ */ /* PRQA S 0434,0911,2214,3110,3417 ++ */ #include "misra.h" #include "m2cmex.h" #define SUM(A,B,C,D) ((A) + (B) + (C) + (D)) /* MISRA Violation - Rule 19.7 */ extern S16 test_1909( void ) { #if 0 /* QAC will not parse the following code. A syntax error will be generated if the code is not in an excluded block */ s16a = SUM( 5, #ifdef SW /* MISRA Violation */ s16b, #else /* MISRA Violation */ s16c, #endif /* MISRA Violation */ 0 ); #endif return 1; }