On 11.12.2023 11:53, Andrew Cooper wrote:
> On 08/12/2023 12:09 am, Stefano Stabellini wrote:
>> Add the rules accepted in the last three MISRA C working group meetings.
>>
>> Signed-off-by: Stefano Stabellini <[email protected]>
>> ---
>> Changes in v2:
>> - remove 17.1 for now, to be a separate patch
>> - add a clarification comment for 17.7
>> ---
>>  docs/misra/rules.rst | 34 ++++++++++++++++++++++++++++++++++
>>  1 file changed, 34 insertions(+)
>>
>> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
>> index 75921b9a34..2b570af0e0 100644
>> --- a/docs/misra/rules.rst
>> +++ b/docs/misra/rules.rst
>> @@ -462,6 +462,13 @@ maintainers if you want to suggest a change.
>>  
>>         while(0) and while(1) and alike are allowed.
>>  
>> +   * - `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
>> +     - In addition to break, also other flow control statements such as
>> +       continue, return, goto are allowed.
> 
> And what about fallthrough ?
> 
> $ git grep -iwe fallthrough -e "fall through" | wc -l
> 315
> 
> This is an under-estimate because there are other comment based
> justifications too.
> 
> All are an explicit statement that a break, or other control flow
> statement, is wrong in the given context.

But that's going to be documented in deviations.rst according to my
understanding.

Jan

Reply via email to