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

Can't compile hotspot with c++11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 11
    • 10
    • hotspot
    • c++11, Xcode, clang

    • b01
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: