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

Re: [PATCH] docs/misra: add Rules 8.2, 8.3, 8.14



On Wed, 21 Jun 2023, Jan Beulich wrote:
> On 21.06.2023 03:26, Stefano Stabellini wrote:
> > --- a/docs/misra/rules.rst
> > +++ b/docs/misra/rules.rst
> > @@ -213,6 +213,17 @@ maintainers if you want to suggest a change.
> >       - Types shall be explicitly specified
> >       -
> >  
> > +   * - `Rule 8.2 
> > <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_02.c>`_
> > +     - Required
> > +     - Function types shall be in prototype form with named parameters
> > +     -
> > +
> > +   * - `Rule 8.3 
> > <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_03.c>`_
> > +     - Required
> > +     - All declarations of an object or function shall use the same
> > +       names and type qualifiers
> > +     -
> 
> I think we want to deal with uses of const when not qualifying a pointed-to
> type: One approach is to simply say we don't use const like this (and the
> few uses there are should then go away). The other, if we deem this a
> valuable feature, would be to make a project-wide exception for this case,
> as having such const in declarations is meaningless and hence at the risk
> of being confusing or hampering readability.

I think they should go away (the first option you wrote).

If you are OK with it, I could add a note here, such as:

"The rule also applies to differences in const-ness."



 


Rackspace

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