docs/misra: add 13.6 to rules.rst

As agreed during MISRA C meetings, add Rule 13.6 to rules.rst, with a
note about extending the rule to alignof and typeof. Also take the
opportunity to remove an older and out of order entry for the same rule.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Stefano Stabellini authored and Stefano Stabellini committed 2024-04-03 16:21:59 -07:00
1 parent 538ab07bad
commit 6117179dd9
1 file changed
+7 -6
+7 -6
View File
@@ -434,17 +434,18 @@ maintainers if you want to suggest a change.
parameter declared as "array of type"
-
* - `Rule 13.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_06.c>`_
- Mandatory
- The operand of the sizeof operator shall not contain any
expression which has potential side effects
-
* - `Rule 13.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_01_1.c>`_
- Required
- Initializer lists shall not contain persistent side effects
-
* - `Rule 13.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_06.c>`_
- Required
- The operand of the sizeof operator shall not contain any
expression which has potential side effects
- In addition to sizeof, we also want to apply the rule to typeof
and alignof
* - `Rule 14.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_01.c>`_
- Required
- A loop counter shall not have essentially floating type
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.