/* >>>------------------------------------------------------------ * * File: rule_19.5.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 19.5 (Required): * Macros shall not be #define'd or #undef'd within a block. * * Implemented by message: * 842 Using #define or #undef inside a function. * * <<<------------------------------------------------------------ */ #include "misra.h" #include "m2cmex.h" #define L 5 #undef L /* MISRA Violation of Rule 19.6 */ extern S16 test_1905( void ) { #define M 10 /* MISRA Violation of Rule 19.5 */ #undef M /* MISRA Violation of Rule 19.5 and Rule 19.6 */ return 0; }