On 07.09.2023 03:22, Stefano Stabellini wrote: > @@ -385,6 +386,17 @@ maintainers if you want to suggest a change. > - A loop counter shall not have essentially floating type > - > > + * - `Rule 14.3 > <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_03.c>`_ > + - Required > + - Controlling expressions shall not be invariant > + - Due to the extensive usage of IS_ENABLED, sizeof compile-time > + checks, and other constructs that are detected as errors by MISRA > + C scanners, managing the configuration of a MISRA C scanner for > + this rule would be unmanageable. Thus, this rule is adopted with > + a project-wide deviation on if ?: and switch statements.
Do we want to go as far as permitting this uniformly for all switch()? In my earlier reply I had included sizeof() for a reason. Also (nit) there's at least a comma missing after "if". To make clear it's keywords that are meant, maybe better use if() / switch()? Jan
