dragonwell-releng / issues-repo

0 stars 0 forks source link

[riscv64-8u]error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register] #30

Open sendaoYan opened 5 months ago

sendaoYan commented 5 months ago
/home/yansendao/tone/run/csmith/gcc-13.2.0-binary/bin/g++ -DLINUX -D_GNU_SOURCE -DAARCH64 -I/home/yansendao/git/jdk8u-dev/hotspot/src/share/vm/prims -I/home/yansendao/git/jdk8u-dev/hotspot/src/share/vm -I/home/yansendao/git/jdk8u-dev/hotspot/src/share/vm/precompiled -I/home/yansendao/git/jdk8u-dev/hotspot/src/cpu/aarch64/vm -I/home/yansendao/git/jdk8u-dev/hotspot/src/os_cpu/linux_aarch64/vm -I/home/yansendao/git/jdk8u-dev/hotspot/src/os/linux/vm -I/home/yansendao/git/jdk8u-dev/hotspot/src/os/posix/vm -I/home/yansendao/git/jdk8u-dev/hotspot/src/share/vm/adlc -I../generated -DASSERT -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_aarch64 -DTARGET_ARCH_MODEL_aarch64 -DTARGET_OS_ARCH_linux_aarch64 -DTARGET_OS_ARCH_MODEL_linux_aarch64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -pipe -fno-strict-aliasing -fno-omit-frame-pointer -Werror -g -c -o ../generated/adfiles/output_h.o /home/yansendao/git/jdk8u-dev/hotspot/src/share/vm/adlc/output_h.cpp 
/home/yansendao/git/jdk8u-dev/hotspot/src/share/vm/adlc/dict2.cpp: In function ‘int hashstr(const void*)’:
/home/yansendao/git/jdk8u-dev/hotspot/src/share/vm/adlc/dict2.cpp:286:17: error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register]
  286 |   register char c, k = 0;
      |  

make.log

sendaoYan commented 5 months ago
diff --git a/hotspot/make/linux/makefiles/adlc.make b/hotspot/make/linux/makefiles/adlc.make
index 92b8b9b3911..9877fdac06a 100644
--- a/hotspot/make/linux/makefiles/adlc.make
+++ b/hotspot/make/linux/makefiles/adlc.make
@@ -67,7 +67,7 @@ CXXFLAGS += -DASSERT
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 # Compiler warnings are treated as errors
 CFLAGS_WARN = $(WARNINGS_ARE_ERRORS)
-CFLAGS += $(CFLAGS_WARN)
+CFLAGS += $(CFLAGS_WARN) -Wno-register

 OBJECTNAMES = \
        adlparse.o \