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 ?

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.

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.

/Magnus



The   configure flag  --with-extra-cflags   is not used by us .

Best regards, Matthias



-----Original Message-----
From: Aleksey Shipilev <[email protected]>
Sent: Mittwoch, 31. Oktober 2018 16:49
To: Baesken, Matthias <[email protected]>; 'build-
[email protected]' <[email protected]>
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

Reply via email to