From c36e8cdc5f1175a3f2a771194434d76324d8cdbb Mon Sep 17 00:00:00 2001 Date: Fri, 17 Apr 2020 17:42:09 +0000 Subject: [PATCH] 8181503: Can't compile hotspot with c++11 Summary: : fix c++11 compiler issues LLT: N/A Bug url: https://bugs.openjdk.java.net/browse/JDK-8181503 --- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp | 6 +++--- hotspot/src/share/vm/code/compiledIC.cpp | 2 +- hotspot/src/share/vm/utilities/vmError.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp index 018feea1..935a16b5 100644 --- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp +++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @@ -281,11 +281,11 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC address os::current_stack_pointer() { #if defined(__clang__) || defined(__llvm__) register void *esp; - __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp)); + __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); return (address) esp; #elif defined(SPARC_WORKS) register void *esp; - __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp)); + __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); return (address) ((char*)esp + sizeof(long)*2); #else register void *esp __asm__ (SPELL_REG_SP); @@ -368,7 +368,7 @@ frame os::get_sender_for_C_frame(frame* fr) { intptr_t* _get_previous_fp() { #if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__) register intptr_t **ebp; - __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp)); + __asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp)); #else register intptr_t **ebp __asm__ (SPELL_REG_FP); #endif diff --git a/hotspot/src/share/vm/code/compiledIC.cpp b/hotspot/src/share/vm/code/compiledIC.cpp index 63821c06..06794215 100644 --- a/hotspot/src/share/vm/code/compiledIC.cpp +++ b/hotspot/src/share/vm/code/compiledIC.cpp @@ -222,7 +222,7 @@ bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecod assert(bytecode == Bytecodes::_invokeinterface, ""); int itable_index = call_info->itable_index(); entry = VtableStubs::find_itable_stub(itable_index); - if (entry == false) { + if (entry == NULL) { return false; } #ifdef ASSERT diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp index e5aad6ff..23d495d9 100644 --- a/hotspot/src/share/vm/utilities/vmError.cpp +++ b/hotspot/src/share/vm/utilities/vmError.cpp @@ -399,7 +399,7 @@ void VMError::report(outputStream* st) { STEP(15, "(printing type of error)") - switch(_id) { + switch(static_cast(_id)) { case OOM_MALLOC_ERROR: case OOM_MMAP_ERROR: if (_size) { -- 2.19.0