RFR(10)(S): 8181503: Can't compile hotspot with c++11
Gerard Ziemski
gerard.ziemski at oracle.com
Mon Jun 12 14:29:51 UTC 2017
hi all,
Please review this small fix, which addresses 4 issues caught by c++11 compiler on a Mac:
#1 Error in src/share/vm/utilities/debug.hpp
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:
For a fix see http://cr.openjdk.java.net/~gziemski/8181503_rev1/src/share/vm/utilities/vmError.cpp.udiff.html and http://cr.openjdk.java.net/~gziemski/8181503_rev1/src/share/vm/utilities/vmError.hpp.udiff.html
#2 Error in src/share/vm/compiler/methodMatcher.cpp
jdk10/hotspot/src/share/vm/compiler/methodMatcher.cpp:99:19: error: comparison between pointer and integer ('char *' and 'int')
if (colon + 2 != '\0') {
~~~~~~~~~ ^ ~~~~
For a fix see http://cr.openjdk.java.net/~gziemski/8181503_rev1/src/share/vm/compiler/methodMatcher.cpp.udiff.html
#3 Error in src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
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));
For a fix see http://cr.openjdk.java.net/~gziemski/8181503_rev1/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.udiff.html
#4 Error in 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) {
~~~~~ ^ ~~~~~
For a fix see http://cr.openjdk.java.net/~gziemski/8181503_rev1/src/share/vm/code/compiledIC.cpp.udiff.html
References:
bug link at https://bugs.openjdk.java.net/browse/JDK-8181503
webrev at http://cr.openjdk.java.net/~gziemski/8181503_rev1
Tested with JPRT hotspot.
cheers
More information about the hotspot-dev
mailing list