Re: [PATCH] docs/misra: add R11.1 R11.2 R11.3 R11.6

2023-11-14 Thread Jan Beulich
On 14.11.2023 23:37, Stefano Stabellini wrote: > [PATCH v2] docs/misra: add R11.1 R11.2 R11.3 R11.6 > > Add MISRA C Rules 11.1, 11.2, 11.3, 11.6 as discussed. > > Explicitly add in the notes that conversions to integer types are > permitted if the destination type has enough bits to hold the enti

Re: [PATCH] docs/misra: add R11.1 R11.2 R11.3 R11.6

2023-11-14 Thread Stefano Stabellini
On Tue, 14 Nov 2023, Jan Beulich wrote: > On 14.11.2023 00:44, Stefano Stabellini wrote: > > --- a/docs/misra/rules.rst > > +++ b/docs/misra/rules.rst > > @@ -383,6 +383,38 @@ maintainers if you want to suggest a change. > > > > CFLAGS="-Warith-conversion -Wno-error=arith-conversion" make

Re: [PATCH] docs/misra: add R11.1 R11.2 R11.3 R11.6

2023-11-14 Thread Jan Beulich
On 14.11.2023 00:44, Stefano Stabellini wrote: > --- a/docs/misra/rules.rst > +++ b/docs/misra/rules.rst > @@ -383,6 +383,38 @@ maintainers if you want to suggest a change. > > CFLAGS="-Warith-conversion -Wno-error=arith-conversion" make -C xen > > + * - `Rule 11.1 >

[PATCH] docs/misra: add R11.1 R11.2 R11.3 R11.6

2023-11-13 Thread Stefano Stabellini
Add MISRA C Rules 11.1, 11.2, 11.3, 11.6 as discussed. Explicitly add in the notes that conversions to integer types are permitted if the destination type has enough bits to hold the entire value. GCC gives enough guarantees in terms of preserving the bit content in such situations. Also allow fo