According to MISRA rule 13.5 the right hand operand of a logical && or || operator shall not contain persistent side effects. Our C-code is checked with PC-Lint, message 9007 (http://gimpel-online.com/MsgRef.html#9007).
We have code of the form
if((GET_SIGNAL1() < CONST_1) || (GET_SIGNAL2() == CONST_2) )
{
dostuff();
}
GET_x are macros, well, getting signal x with some error handling, the later causing intended side effects. A rule deviation to MISRA 13.5 is given, now the question is how to suppress the respective messages.
Efforts so far: Since this is auto generated code I can't put in lint comments directly, putting the comments in through the generator is though and, primarily, hardly traceable.
--e{(9007))} in the macro definition would work, but we also have code like
foo = GET_SIGNAL1();
which would cause a function wide deactivation.
Thought about -ecall, too, but it just checks the call itself, not the context of the macro (as I hoped).