I would have assumed
-Wall
(GNU/clang) or /W4
(MSVC) would generate a warning for the bool b = 5;
case...