19-04-2024, 04:48 PM
The short and unhelpful answer is that [[fallthrough]] was introduced to C++ after MISRA 2008 had been published, so is out of scope of any MISRA 2008 rule.
Having said that, looking at the rationale for 6-2-3, if this were still a requirement, then "[[fallthrough]]; // comment" should be acceptable as a null-statement on a single line
Having said that, looking at the rationale for 6-2-3, if this were still a requirement, then "[[fallthrough]]; // comment" should be acceptable as a null-statement on a single line
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group