Enable implicit switch fallthrough detection

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 26
    • Component/s: hotspot

      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.

            Assignee:
            Unassigned
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: