minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-context flag in HS build (original) (raw)
Erik Joelsson erik.joelsson at oracle.com
Wed Oct 31 16:04:51 UTC 2018
- Previous message (by thread): minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-context flag in HS build
- Next message (by thread): RFR: JDK-8210837: Add libXrandr-devel to the Linux devkits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Matthias,
It's our experience that GCC ignores unknown warning tags, so we regard it as safe to disable warnings only present in later versions of GCC. If another error is triggered, it will however print a message like you describe for any unknown tags. This is what happened in the issue Aleksey linked and I suspect is also happening for you.
/Erik
On 2018-10-31 08:40, Baesken, Matthias wrote:
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 _DISABLEDWARNINGSgcc := 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 CCVERSIONNUMBER 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
- Previous message (by thread): minimal gcc version for jdk/jdk and usage of -Wno-int-in-bool-context flag in HS build
- Next message (by thread): RFR: JDK-8210837: Add libXrandr-devel to the Linux devkits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]