[jdk11u-dev] RFR: 8210988: Improved handling of compiler warnings in the build [v2]

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon Mar 25 08:17:44 UTC 2024


Hi,

The problematic coding is 
src\hotspot\cpu\aarch64\register_aarch64.hpp(285):
uint32_t first = _bitset & -_bitset;

It has moved in 17, but is unchanged.
So there does not exist a fix directly in the C++ coding.
This leaves two cases
  * We use a different compiler for 11 and 17 windows aarch64 builds
  * The warning is suppressed somehow in 17

Ahh... This is warning C4146, which you remove here: 
make/hotspot/lib/CompileGtest.gmk
-    DISABLED_WARNINGS_microsoft := 4146, \

Maybe you need to add it again below. (Instead, you add 4996)?
Ev. compare with the original change.
But this is the Gtest makefile, so unlikely that it helps.

This looks strange, too:

make/hotspot/lib/CompileJvm.gmk
    DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
    DISABLED_WARNINGS_microsoft := 4146, \

Doesn't this overwrite the first setting? Should it be 
    DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft) 4146, \

Also compare with the original change, or the code in 17.

Unfortunately we don't have a build for this platform locally, 
so you need to try with the GHA testing.

Best regards, Goetz.



> -----Original Message-----
> From: jdk-updates-dev <jdk-updates-dev-retn at openjdk.org> On Behalf Of
> Andrew Lu
> Sent: Monday, March 25, 2024 8:37 AM
> To: jdk-updates-dev at openjdk.org
> Subject: Re: [jdk11u-dev] RFR: 8210988: Improved handling of compiler
> warnings in the build [v2]
> 
> On Mon, 25 Mar 2024 07:23:03 GMT, Goetz Lindenmaier
> <goetz at openjdk.org> wrote:
> 
> > Hi @luchenlin, @RealLucy, are you sure the build errors are unrelated?
> >
> > d:\a\jdk11u-dev\jdk11u-
> dev\src\hotspot\cpu\aarch64\register_aarch64.hpp(285): error C2220: the
> following warning is treated as an error d:\a\jdk11u-dev\jdk11u-
> dev\src\hotspot\cpu\aarch64\register_aarch64.hpp(285): warning C4146:
> unary minus operator applied to unsigned type, result still unsigned make[3]:
> *** [lib/CompileGtest.gmk:64: /d/a/jdk11u-dev/jdk11u-dev/build/windows-
> aarch64/hotspot/variant-
> server/libjvm/gtest/objs/BUILD_GTEST_LIBJVM_pch.obj] Error 1 make[2]: ***
> [make/Main.gmk:272: hotspot-server-libs] Error 2
> >
> > Best regards, Goetz.
> 
> Hi @GoeLin,  not sure about this, is this like the related backport?
> https://bugs.openjdk.org/browse/JDK-8211081
> 
> -------------
> 
> PR Comment: https://git.openjdk.org/jdk11u-dev/pull/2606#issuecomment-
> 2017387068


More information about the jdk-updates-dev mailing list