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

Can't compile hotspot with c++11

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Environment:

      c++11, Xcode, clang

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

      Description

      Here are the 4 issues that need fixing (clean-up) in order to compile hotspot with c++11:

      #1 src/share/vm/utilities/debug.hpp

      /Volumes/Work/jdk10/hotspot/src/share/vm/utilities/vmError.cpp:450:13: error: case value evaluates to 3758096384, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
             case INTERNAL_ERROR:
                  ^
      /Volumes/Work/jdk10/hotspot/src/share/vm/utilities/vmError.cpp:424:13: error: case value evaluates to 3758096386, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
             case OOM_MMAP_ERROR:
                  ^
      /Volumes/Work/jdk10/hotspot/src/share/vm/utilities/vmError.cpp:423:13: error: case value evaluates to 3758096385, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
             case OOM_MALLOC_ERROR:

      #2 src/share/vm/compiler/methodMatcher.cpp

      /Volumes/Work/jdk10/hotspot/src/share/vm/compiler/methodMatcher.cpp:99:19: error: comparison between pointer and integer ('char *' and 'int')
          if (colon + 2 != '\0') {
              ~~~~~~~~~ ^ ~~~~

      #3 src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp

      /Volumes/Work/jdk10/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp:282:19: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
                        ^
      /Volumes/Work/jdk10/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp:418:19: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));

      #4 src/share/vm/code/compiledIC.cpp

      /Volumes/Work/jdk10/hotspot/src/share/vm/code/compiledIC.cpp:227:15: error: comparison between pointer and integer ('address' (aka 'unsigned char *') and 'int')
          if (entry == false) {
              ~~~~~ ^ ~~~~~

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gziemski Gerard Ziemski
                Reporter:
                gziemski Gerard Ziemski
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: