On 24.04.2024 09:37, Federico Serafini wrote: > On 23/04/24 18:06, Jan Beulich wrote: >> On 23.04.2024 17:52, Federico Serafini wrote: >>> On 23/04/24 12:26, Jan Beulich wrote: >>>> On 23.04.2024 12:02, Federico Serafini wrote: >>>>> + >>>>> + * - R16.4 >>>>> + - A switch statement with a single switch clause and no default >>>>> label may >>>>> + be used in place of an equivalent if statement if it is >>>>> considered to >>>>> + improve readability." >> >> No, I don't think there should be examples in those documents. But those >> documents should also not (blindly) rely on terminology in the Misra >> spec, as not everyone has access to that (licensed copies had to be >> obtained for quite a few of us). > > In deviations.rst there is an identical deviation for Rule 16.6 > ("Every switch statement shall have at least two switch-clauses"). > I think we should remain consistent.
Sure, I'm all for consistency. Yet given the term "switch clause" doesn't appear in the C standard (afaics), it wants defining somewhere. Jan