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

Re: [PATCH] docs/misra: add rule 11.9


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, roberto.bagnara@xxxxxxxxxxx
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 27 Sep 2023 08:49:22 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=33J9bd4saBmDWBBk74RotF6uYAB8GSLBHMP6UltEAwA=; b=D506As/HEH4cGntQJnmho7iq66TLgFFuseOE1ShW88nL5ewKbU3pl4FuD8gB5ZNctTgaviAXxmF4BGhC/BOnnUo10Pohi3+YHzHnbDqh92UN8yiBE34ab9DudMKV7+1vJG+oAhAKnwDf/Llbekuu9clHzPR77yDzW0EPHg8CYmrPk+63z0hmt8dxhdKb07OX3HRRwSDBXjoPiN+ZdgBC+qpdO9/DJMPrVzopLi7np4JlAflzQ1RYx1ReGvcVxHAgZcHAAzIhOWSpz8Ov6gPvTC2N8cnxgrsKhGUn6aIgtVvrgg36gMmtq2r0qeUUw5AqRc2o2k0LCMge7OdKGVpn/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ncj9VNDKkD2DKGCv9p2TAIOJ5Jims03UbiNeMq0OHi3KPP088vsRdE2oAJklCB9HN8RLHRx7gc3VKo4bwvWqoK0jNUHKn5fN3mXkH1gQiz05k3wzADdD43Q+DZhd5LYFUu5lpcyj5/Zhz7b4JrwbghqLEByRknQUd4hDebohOq6Dy8r8PyIJ8B0JT+Zzlx1hRPhc72x4fF1BzSBQFWTScDI5T5rcLVtayl1XFj57YBOQ302XNFWU12bUJCerWWXoFW7NbT+fB8DQ6ajjUi8PEX0iPYyxGWS3TEBo4bx9JFb2cAxhMn2ti6UlhNw/583wK8VQSJ6hFlIzybtKoR2BTw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, george.dunlap@xxxxxxxxxx, julien@xxxxxxx, bertrand.marquis@xxxxxxx, roger.pau@xxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 27 Sep 2023 06:49:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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