On 18/10/2023 2:42 pm, Nicola Vetrini wrote: > diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst > index ee7aed0609d2..1b00e4e3e9b7 100644 > --- a/docs/misra/deviations.rst > +++ b/docs/misra/deviations.rst > @@ -199,6 +199,11 @@ Deviations related to MISRA C:2012 Rules: > See automation/eclair_analysis/deviations.ecl for the full > explanation. > - Tagged as `safe` for ECLAIR. > > + * - R11.9 > + - __ACCESS_ONCE uses a 0 as a null pointer constant to check if a type > is > + scalar, therefore its usage for this purpose is allowed.
This is still deeply misleading. There is an integer, which happens to be 0 but could be anything, used for a compile time typecheck[1]. In some cases this may be interpreted as a pointer constant, and is permitted for this purpose. ~Andrew [1] I know I wrote scalar typecheck in the comment, but I suspect that what I actually meant was non-compound-type typecheck.