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

Xcode 7.3 -Wshift-negative-value compile failure on Mac OS X

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b122
    • OS:
      os_x

      Backports

        Description

        After modifying gcc.make, on Mac OSX 10.11.4 with Xcode 7.3, the build fails with this error:

        Generating precompiled header precompiled.hpp.pch
        In file included from <built-in>:332:
        In file included from <command line>:22:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/precompiled/precompiled.hpp:30:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/asm/assembler.inline.hpp:31:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/cpu/x86/vm/assembler_x86.inline.hpp:30:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/code/codeCache.hpp:28:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/code/codeBlob.hpp:30:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/runtime/frame.hpp:28:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/method.hpp:33:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/constantPool.hpp:32:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/typeArrayOop.hpp:29:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/typeArrayKlass.hpp:29:
        In file included from /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/arrayKlass.hpp:29:
        /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/klass.hpp:327:58: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
            return (juint)lh >= (juint)(_lh_array_tag_type_value << _lh_array_tag_shift);
                                        ~~~~~~~~~~~~~~~~~~~~~~~~ ^
        /Users/morris/hotspot/hs9/hotspot/src/share/vm/oops/klass.hpp:331:55: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
            return (jint)lh < (jint)(_lh_array_tag_type_value << _lh_array_tag_shift);
                                     ~~~~~~~~~~~~~~~~~~~~~~~~ ^
        2 errors generated.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                gziemski Gerard Ziemski
                Reporter:
                morris Morris Meyer (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: