[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] docs/misra: add 14.3



On Thu, 31 Aug 2023, Jan Beulich wrote:
> On 31.08.2023 03:53, Stefano Stabellini wrote:
> > @@ -332,6 +333,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 ?: statements.
> 
> As before - switch(sizeof(...)) and alike also wants deviating, imo.

I added the switch, but without the words "and alike" because it is not
clear in this context what it would allow.


> > +       while(0) and while(1) are allowed.
> 
> ... and alike ... (to also cover e.g. while(true)).

Here the words "and alike" are clearer so I added them



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.