07-10-2022, 11:41 AM
From the wording of the Autosar rule, you are right that additional parentheses are required.
However, Autosar inherited this rule from MISRA C++:2008 5-2-1, and in MISRA there was an explicit exception for sequences of && and || (but not a mixture).
This is being reviewed for the next version.
However, Autosar inherited this rule from MISRA C++:2008 5-2-1, and in MISRA there was an explicit exception for sequences of && and || (but not a mixture).
This is being reviewed for the next version.
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group