Cleanup ShouldNotXXX uses in machnode.cpp

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: 24
    • Component/s: hotspot
    • b11

      A number of functions in the MachOper and MachNode class (in machnode.cpp) have implementations that just call ShouldNotReachHere() or ShouldNotCallThis().

      Some of those functions return void, and the ShouldNotXXX call is the entire definition.

      Some have a non-void return type, but still just call the ShouldNotXXX function, relying on [[noreturn]] handling to avoid warnings about not returning a value of the appropriate type.

      And some (still) have dummy dead code following the ShouldNotXXX call to suppress no longer generated warnings about needing to return a value of the appropriate type. Some of these are returning literal 0 from a function returning a pointer type, triggering -Wzero-as-null-pointer-constant warnings when enabled.

      Remove all the dead code after ShouldNotXXX calls in machnode.cpp, for consistency and to remove the -Wzero-as-null-pointer-constant warnings.

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

              Created:
              Updated:
              Resolved: