cpp:S868: Parentheses about negated operand

Hello,

The case of negated operand, raised as a problem by S868, inspired by MISRA, is especially irritating.

There was an other post about this subject:

There is also this Jira issue, which doesn’t adress this case:

Is this rule still in MISRA C++ 2023 ?

@Fred_Tingaud Could you please give us some news ?

Thanks.

Hi @Oodini,
Thanks for your question and sorry for the delay in my reply.
I created a ticket to follow up on this point because I agree that it is too constraining in the case of a negation operator.
The corresponding rule has evolved a lot in C++23 and negated operators no longer raise it.

Thanks ! That modification should arrive soon !

You mean MISRA C++ 23 ?

Yes, sorry, MISRA C++23.