Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8156076

support clang 7.3 and fix warnings about shifting a negative signed value

XMLWordPrintable

      After upgrading to Xcode 7.3 (7D175), clang generates new warnings such as:

      /Users/dsimon/hs-comp/hotspot/src/share/vm/oops/klass.hpp:327:58: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
          return (juint)lh >= (juint)(_lh_array_tag_type_value << _lh_array_tag_shift);
                                      ~~~~~~~~~~~~~~~~~~~~~~~~ ^
      /Users/dsimon/hs-comp/hotspot/src/share/vm/oops/klass.hpp:331:55: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
          return (jint)lh < (jint)(_lh_array_tag_type_value << _lh_array_tag_shift);
                                   ~~~~~~~~~~~~~~~~~~~~~~~~ ^
      /Users/dsimon/hs-comp/hotspot/src/share/vm/opto/library_call.cpp:3773:20: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
                         << Klass::_lh_array_tag_shift)
                         ^

      I think the fix is shown in http://hg.openjdk.java.net/graal/graal-jvmci-9/hotspot/rev/881f8ce4bb11

      Also, the supported clang version check needs to be updated:

      http://hg.openjdk.java.net/graal/graal-jvmci-9/hotspot/rev/a774e0a83dd4

            Unassigned Unassigned
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: