RFR: JDK-8211073 Remove -Wno-extra from Hotspot

David Holmes david.holmes at oracle.com
Tue Oct 22 07:36:13 UTC 2019


Hi Magnus,

On 22/10/2019 5:17 pm, Magnus Ihse Bursie wrote:
> The -Wextra option to gcc enables a bunch of useful warnings. Some of 
> them, but not all, can be individually enabled or disabled. All other 
> libraries in OpenJDK are compiled with -Wextra, but not Hotspot. 
> Enabling -Wextra triggers a couple of warnings that can be individually 
> disabled. (The idea here is not to just permanently disable those 
> warnings (unless that makes sense), but to look at these warnings one at 
> a time and see how they can be addressed.)
> 
> My trial runs with -Wextra has already found a couple of real issues 
> (fixed in JDK-8213414).
> 
> I have tested that this compiles without warnings on gcc 4.8, 5.5, 6.5, 
> 7.4 and 8.3 on x64. I have also tried building zero on x64, aarch64 and 
> arm32 with gcc 8.3.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8211073
> WebRev: 
> http://cr.openjdk.java.net/~ihse/JDK-8211073-enable-extra-on-hotspot/webrev.01 

I'm somewhat surprised that this isn't triggering more warnings, but if 
not then that is a good thing. :) I wouldn't be surprised if gcc 9.x 
causes something else pop up.

Fix seems fine.

Thanks,
David

> 
> /Magnus



More information about the build-dev mailing list