From 856664f774bd5b66301c5f9022126b61b8cb492d Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 13 Feb 2024 14:33:34 -0800 Subject: [PATCH] docs/misra/rules.rst: add rule 14.4 Signed-off-by: Stefano Stabellini Acked-by: Bertrand Marquis --- docs/misra/rules.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index efea063ab9..1e134ccebc 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -462,6 +462,15 @@ maintainers if you want to suggest a change. while(0) and while(1) and alike are allowed. + * - `Rule 14.4 `_ + - Required + - The controlling expression of an if-statement and the controlling + expression of an iteration-statement shall have essentially + Boolean type + - Automatic conversions of integer types to bool are permitted. + Automatic conversions of pointer types to bool are permitted. + This rule still applies to enum types. + * - `Rule 16.3 `_ - Required - An unconditional break statement shall terminate every