On 27.09.2023 03:05, Stefano Stabellini wrote:
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -373,6 +373,11 @@ maintainers if you want to suggest a change.
>       - A cast shall not remove any const or volatile qualification from the 
> type pointed to by a pointer
>       -
>  
> +   * - `Rule 11.9 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_11_09.c>`_
> +     - Required
> +     - The macro NULL shall be the only permitted form of integer null 
> pointer constant
> +     -

I think there's a terminology issue, which I'd prefer if we didn't inherit
from the Misra spec: NULL is not an integer constant expression. A null
pointer constant can be either plain 0 or ((void*)0); the former is an
integer constant expression, while the latter is not. Aiui it is the
"Amplification" text in the doc which correlates with the use of "integer"
in the title; since (as per above) I think the text is wrong in this
regard, the use of the word here also is at best misleading. The C99 spec
also doesn't know the term "integer null pointer constant"; only "null
pointer constant" is specified and used.

With the word dropped despite then not being in sync with the doc:
Acked-by: Jan Beulich <[email protected]>

Jan

Reply via email to