All of gcc, clang, and Visual Studio provide options to warn when a switch case implicitly falls through to the next case. For gcc and clang it's `-Wimplicit-fallthrough[=level]`, and for Visual Studio it's C26819.
We currently don't enable these warnings at all for Visual Studio. The level 3 warning is enabled for gcc and clang, by `-Wextra`. But for HotSpot we disable this warning. And there are currently 85 such warnings when building HotSpot.
Once we have C++17 `[[fallthrough]]` attributes, those places should be examined and apply the new attribute, or fix any bugs that might be found by that examination. Once that's been done, stop disabling the warning.
We currently don't enable these warnings at all for Visual Studio. The level 3 warning is enabled for gcc and clang, by `-Wextra`. But for HotSpot we disable this warning. And there are currently 85 such warnings when building HotSpot.
Once we have C++17 `[[fallthrough]]` attributes, those places should be examined and apply the new attribute, or fix any bugs that might be found by that examination. Once that's been done, stop disabling the warning.