mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
538ab07bad
commit
6117179dd9
1 file changed
+7
-6
@@ -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
|
||||
|
||||