minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-context flag in HS build (original) (raw)

Baesken, Matthias matthias.baesken at sap.com
Wed Oct 31 15:40:25 UTC 2018


Hello, I noticed that we currently set flags for gcc to disable warnings.

See

https://hg.openjdk.java.net/jdk/jdk/file/896e80158d35/make/hotspot/lib/CompileJvm.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 :

/gcc-6/bin/gcc sizeof.c -Wall -Wextra -Wno-int-in-bool-context -o sizeof

sizeof.c: At top level: cc1: warning: unrecognized command line option '-Wno-int-in-bool-context'

Should we force all users to gcc 7 and higher (otherwise we could maybe check CC_VERSION_NUMBER in the makefile) ? Before we internally switched our OpenJDK builds from gcc 4.8 to gcc 7 we had a patch in our build-queue that disabled the -Wnoint-in-bool-context .

Best regards, Matthias



More information about the build-dev mailing list