08-05-2026, 01:05 PM
We think that M5-2-2 is not relevant to this topic. The relevant AUTOSAR rule is M5-2-10.
AUTOSAR took the M5-2-10 headline from that in MISRA C++::2008, and whilst that says "... should not be mixed with other operators in an expression", the rationale makes it clear that this only applies to arithmetic operators, so a checker should accept "d->member++;"
AUTOSAR took the M5-2-10 headline from that in MISRA C++::2008, and whilst that says "... should not be mixed with other operators in an expression", the rationale makes it clear that this only applies to arithmetic operators, so a checker should accept "d->member++;"
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group

