...
Anchor | ||||
---|---|---|---|---|
|
default
label in a switch
statement whose controlling expression has an enumerated type and that specifies labels for all enumerations of the type. (See MSC01-C. Strive for logical completeness.) Because valid values of an enumerated type include all those of its underlying integer type, unless enumeration constants are provided for all those values, the default
label is appropriate and necessary....
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
CodeSonar |
| LANG.STRUCT.UC | Unreachable {Call, Computation, Conditional, Control Flow, Data Flow} | ||||||
| DEADCODE
| Can detect the specific instance where code can never be reached because of a logical contradiction or a dead "default" in Can detect the instances where code block is unreachable because of the syntactic structure of the code | |||||||
|
| Can detect violations of this recommendation when the | |||||||
| LV_UNUSED.GEN VA_UNUSED.* UNREACH.* |
| |||||||
| 1 J | Fully implemented | |||||||
Parasoft C/C++test | 9.5 | MISRA2008-0_1_{a,b,c,d,e,f,g}, BD-PB-SWITCH | Fully implemented | ||||||
PRQA QA-C |
| 1501,1503,2008,2880,2881,2882,2883,2877,3196, 3202,3203,3205,3206,3207,3210,3219,3229,3404, 3422,3423,3425,3470,2980,2981,2982,2983,2984,2985,2986 | Fully implemented | ||||||
SonarQube Plugin |
| S1763, S1751 | |||||||
|
| Can detect violations of this recommendation when the |
...