/* >>>------------------------------------------------------------ * * File: rule_12.9.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 12.9 (Required): * The unary minus operator shall not be applied to an expression * whose underlying type is unsigned. * * Implemented by messages: * 3101 Unary '-' applied to an operand of type unsigned int or * unsigned long gives an unsigned result. * * 3102 Unary '-' applied to an operand whose underlying type is * unsigned. * * <<<------------------------------------------------------------ */ /* PRQA S 3199,3203 ++ */ #include "misra.h" #include "m2cmex.h" extern S16 test_1209( void ) { u32r = -u32a; /* MISRA Violation */ s16a = -u8a; /* MISRA Violation */ return 1; }