I should have clarified more; you'd use this for switches where you need to always handle all cases.
Then if a you add a new value to the enum but forget to update the switch, you get a compile-time error instead of a buggy program.
58 karma · joined October 4, 2017
-Werror=switch
Using this, you can enforce that a switch statement over an enum value is complete (covers all cases) simply by omitting the default case.