Skip to content

Commit

Permalink
docs/misra/rules.rst: add rule 16.6 and 20.12
Browse files Browse the repository at this point in the history
Signed-off-by: Stefano Stabellini <[email protected]>
Acked-by: Julien Grall <[email protected]>
  • Loading branch information
sstabellini committed Feb 29, 2024
1 parent e1de3a0 commit 4cac80e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/misra/rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4cac80e

Please sign in to comment.