From 4cac80e22600d5a38d77c65e9a6507c752efc155 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 13 Feb 2024 14:33:32 -0800 Subject: [PATCH] docs/misra/rules.rst: add rule 16.6 and 20.12 Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- docs/misra/rules.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 182331089d..c185366966 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -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 `_ + - 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 `_ - 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 `_ + - 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 `_ - Required - A line whose first token is # shall be a valid preprocessing -- 2.39.5