Menu ▾ ▴

#53 Issue warnings for misused "default:" clause

1.0
open
nobody
5
2007-08-30
2007-08-30
No

A level 3 warning shall be issued when the specified case ranges do not cover the entire range of the switch selector and there is no "default:" clause in the same switch statement.

A level 1 warning shall be issued when the specified case ranges cover the entire range of the switch selector and there is a "default:" clause in the same switch statement.

Discussion