docs/misra/rules.rst: add rule 16.6 and 20.12

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Stefano Stabellini committed 2024-02-29 15:24:39 -08:00
1 parent e1de3a0536
commit 4cac80e226
1 file changed
+13
+13
View File
@@ -478,6 +478,12 @@ maintainers if you want to suggest a change.
adhere to Rule 16.2 would result in increased complexity and
maintenance difficulty, and could potentially introduce bugs.
* - `Rule 16.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_06.c>`_
- Required
- Every switch statement shall have at least two switch-clauses
- Single-clause switches are allowed when they do not involve a
default label.
* - `Rule 16.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_07.c>`_
- Required
- A switch-expression shall not have essentially Boolean type
@@ -554,6 +560,13 @@ maintainers if you want to suggest a change.
evaluation
-
* - `Rule 20.12 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_12.c>`_
- A macro parameter used as an operand to the # or ## operators,
which is itself subject to further macro replacement, shall only
be used as an operand to these operators
- Required
- Variadic macros are allowed to violate the rule.
* - `Rule 20.13 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_13.c>`_
- Required
- A line whose first token is # shall be a valid preprocessing
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.