[XEN PATCH] docs/misra: document the usage of array range initializers

Nicola Vetrini posted 1 patch 9 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/5dc1aa0a5cd2ee3410047956f8e69c32c4b227ca.1690215341.git.nicola.vetrini@bugseng.com
docs/misra/C-language-toolchain.rst | 4 ++++
1 file changed, 4 insertions(+)
[XEN PATCH] docs/misra: document the usage of array range initializers
Posted by Nicola Vetrini 9 months, 1 week ago
The usage of a documented GNU extension that allows a range of elements
in an array to be initalized to the same value using a designated
initalizer is added to this document, to fully comply with
MISRA C:2012 Rule 1.1.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 docs/misra/C-language-toolchain.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/docs/misra/C-language-toolchain.rst b/docs/misra/C-language-toolchain.rst
index 8651f59118..785aed1eaf 100644
--- a/docs/misra/C-language-toolchain.rst
+++ b/docs/misra/C-language-toolchain.rst
@@ -196,6 +196,10 @@ The table columns are as follows:
      - X86_64
      - See Section "6.9 128-bit Integers" of GCC_MANUAL.
 
+   * - Designated initializer for a range of elements
+     - ARM64, X86_64
+     - See Section "6.29 Designated Initializers" of GCC_MANUAL
+
 
 Translation Limits
 __________________
-- 
2.34.1
Re: [XEN PATCH] docs/misra: document the usage of array range initializers
Posted by Stefano Stabellini 9 months, 1 week ago
On Mon, 24 Jul 2023, Nicola Vetrini wrote:
> The usage of a documented GNU extension that allows a range of elements
> in an array to be initalized to the same value using a designated
> initalizer is added to this document, to fully comply with
> MISRA C:2012 Rule 1.1.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  docs/misra/C-language-toolchain.rst | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/docs/misra/C-language-toolchain.rst b/docs/misra/C-language-toolchain.rst
> index 8651f59118..785aed1eaf 100644
> --- a/docs/misra/C-language-toolchain.rst
> +++ b/docs/misra/C-language-toolchain.rst
> @@ -196,6 +196,10 @@ The table columns are as follows:
>       - X86_64
>       - See Section "6.9 128-bit Integers" of GCC_MANUAL.
>  
> +   * - Designated initializer for a range of elements
> +     - ARM64, X86_64
> +     - See Section "6.29 Designated Initializers" of GCC_MANUAL
> +
>  
>  Translation Limits
>  __________________
> -- 
> 2.34.1
>