minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-context flag in HS build
Baesken, Matthias
matthias.baesken at sap.com
Wed Oct 31 16:17:20 UTC 2018
Hi Aleksey , I tried with gcc 6.2 not 6.3 maybe this makes a difference .
Unfortunately I cannot see your exact gcc/g++ compile calls from the logfile .
Do you have "-Wall" set which seems to be necessary to enable the additional flag ?
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
-Wint-in-bool-context
Warn for suspicious use of integer values where boolean values are expected, such as conditional expressions (?:) using non-boolean integer constants in boolean context, like if (a <= b ? 2 : 3).
Or left shifting of signed integers in boolean context, like for (a = 0; 1 << a; a++);. Likewise for all kinds of multiplications regardless of the data type.
This warning is enabled by -Wall.
The configure flag --with-extra-cflags is not used by us .
Best regards, Matthias
> -----Original Message-----
> From: Aleksey Shipilev <shade at redhat.com>
> Sent: Mittwoch, 31. Oktober 2018 16:49
> To: Baesken, Matthias <matthias.baesken at sap.com>; 'build-
> dev at openjdk.java.net' <build-dev at openjdk.java.net>
> Subject: Re: minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-
> context flag in HS build
>
> On 10/31/2018 04:40 PM, Baesken, Matthias wrote:
> >
> https://hg.openjdk.java.net/jdk/jdk/file/896e80158d35/make/hotspot/lib/C
> ompileJvm.gmk
> >
> > DISABLED_WARNINGS_gcc := extra parentheses comment unknown-
> pragmas address \
> > delete-non-virtual-dtor char-subscripts array-bounds int-in-bool-context
> \
> > ignored-qualifiers missing-field-initializers implicit-fallthrough \
> > empty-body strict-overflow sequence-point maybe-uninitialized \
> > misleading-indentation
> >
> >
> > However int-in-bool-context ( -Wnoint-in-bool-context ) seems to be
> available only in gcc 7 + .
> > Example call with gcc 6 leads to a warning :
>
> Current jdk/jdk build works fine with 6.3.0 for me:
>
> https://builds.shipilev.net/openjdk-jdk/openjdk-jdk-b441-20181029-jdk-
> 12+17-linux-x86_64-fastdebug.configure.log
>
> https://builds.shipilev.net/openjdk-jdk/openjdk-jdk-b441-20181029-jdk-
> 12+17-linux-x86_64-fastdebug.build.log
>
> Is this the indication that build system actually probes the warnings before
> trying warning options?
>
> The troubles start when you supply additional options, apparently:
> https://bugs.openjdk.java.net/browse/JDK-8211088
>
> -Aleksey
More information about the build-dev
mailing list