include::../description.adoc[]

== Noncompliant Code Example

The code is syntactically correct but the behavior is not the expected one

----
switch (day) {
  case MONDAY:
  case TUESDAY:
  WEDNESDAY:   // instead of "case WEDNESDAY"
    doSomething();
    break;
  ...
}
----

== Compliant Solution

----
switch (day) {
  case MONDAY:
  case TUESDAY:
  case WEDNESDAY:
    doSomething();
    break;
  ...
}
----

== See

* MISRA C:2004, 15.0 - The MISRA C _switch_ syntax shall be used.
* MISRA {cpp}:2008, 6-4-3 - A switch statement shall be a well-formed switch statement.
* MISRA C:2012, 16.1 - All switch statements shall be well-formed

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
