@@ -462,6 +462,20 @@ maintainers if you want to suggest a change.
while(0) and while(1) and alike are allowed.
+ * - `Rule 16.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_02.c>`_
+ - Required
+ - A switch label shall only be used when the most closely-enclosing
+ compound statement is the body of a switch statement
+ - xen/arch/x86/x86_emulate/ doesn't follow this guideline
+
+ * - `Rule 16.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_03.c>`_
+ - Required
+ - An unconditional break statement shall terminate every
+ switch-clause
+ - Control flow statements (goto, return, continue) and terminals
+ (BUG()) are permitted. Other cases shall have the pseudo-keyword
+ "fallthrough".
+
* - `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
For Rule 16.2 deviate xen/arch/x86/x86_emulate. For Rule 16.2 allow control flow statements and terminals. For the rest, request the "fallthrough" psedo-keyword to be used. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> --- docs/misra/rules.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+)