minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-context flag in HS build
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Thu Nov 1 10:35:51 UTC 2018
On 2018-10-31 17:17, Baesken, Matthias wrote:
> 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 ?
> 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.
Since JDK-8211029, we have -Wall enabled for hotspot on gcc.
I can only reiterate what Erik says. Gcc, since a long time ago,
silently ignores -Wno-XXX for XXX that it does not support or
understand. *However*, if *another* failure occurs, then gcc prints out
warnings for unknown -Wno-XXX flags as well. So those are just red
herrings. If you see them, you will also see another error, and that is
your real problem.
> 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:
>>> 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 \
>>> 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:
>> Is this the indication that build system actually probes the warnings before
>> trying warning options?
>> The troubles start when you supply additional options, apparently:
More information about the build-dev