diff mbox series

[v2,3/3] docs/misra/rules.rst: add rule 14.4

Message ID 20240213223334.3693410-3-stefano.stabellini@amd.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] docs/misra/rules.rst: add rule 16.6 and 20.12 | expand

Commit Message

Stefano Stabellini Feb. 13, 2024, 10:33 p.m. UTC
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
 docs/misra/rules.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Bertrand Marquis March 1, 2024, 7:48 a.m. UTC | #1
Hi Stefano,


> On 13 Feb 2024, at 23:33, Stefano Stabellini <stefano.stabellini@amd.com> wrote:
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>

Coherent with what was discussed during the Misra meeting so:

Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>

Cheers
Bertrand

> ---
> docs/misra/rules.rst | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
> index 931158b354..3e6f94d7bd 100644
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -468,6 +468,15 @@ maintainers if you want to suggest a change.
> 
>        while(0) and while(1) and alike are allowed.
> 
> +   * - `Rule 14.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_04.c>`_
> +     - Required
> +     - The controlling expression of an if-statement and the controlling
> +       expression of an iteration-statement shall have essentially
> +       Boolean type
> +     - Automatic conversions of integer types to bool are permitted.
> +       Automatic conversions of pointer types to bool are permitted.
> +       This rule still applies to enum types.
> +
>    * - `Rule 16.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_03.c>`_
>      - Required
>      - An unconditional break statement shall terminate every
> -- 
> 2.25.1
> 
>
diff mbox series

Patch

diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index 931158b354..3e6f94d7bd 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -468,6 +468,15 @@  maintainers if you want to suggest a change.
 
        while(0) and while(1) and alike are allowed.
 
+   * - `Rule 14.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_04.c>`_
+     - Required
+     - The controlling expression of an if-statement and the controlling
+       expression of an iteration-statement shall have essentially
+       Boolean type
+     - Automatic conversions of integer types to bool are permitted.
+       Automatic conversions of pointer types to bool are permitted.
+       This rule still applies to enum types.
+
    * - `Rule 16.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_03.c>`_
      - Required
      - An unconditional break statement shall terminate every