RFR: build pragma error with gcc 4.4.7 (original) (raw)
Andrew Hughes gnu.andrew at redhat.com
Sat Apr 21 14:50:31 UTC 2018
- Previous message: RFR: 8202082: Remove explicit CMS checks in CardTableBarrierSetAssembler
- Next message: RFR: build pragma error with gcc 4.4.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 16 March 2018 at 11:05, David Holmes <david.holmes at oracle.com> wrote:
Hi Michal,
On 16/03/2018 8:48 PM, Michal Vala wrote:
Hi, I've been trying to build latest jdk with gcc 4.4.7 and I hit compile error due to pragma used in function: That's a very old gcc. Our "official" version is 4.9.2 but we're working on getting gcc 7.x working as well. This code causes no problem on 4.9.2+ so to make any change we'd have to know it will continue to work on later versions. Also a google search indicates the "pragma diagnostic push" and pop weren't added until gcc 4.6 ?? David -----
That's why PRAGMA_DIAG_PUSH/POP were defined by:
https://bugs.openjdk.java.net/browse/JDK-8037816
The mistake was in:
https://bugs.openjdk.java.net/browse/JDK-8187667
using the pragma directly, rather than via the define as elsewhere in the codebase.
$ grep -r 'PRAGMA_DIAG_PUSH' jdk/src/hotspot/ jdk/src/hotspot/share/code/compressedStream.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/share/code/codeCache.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/share/utilities/compilerWarnings.hpp:#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") jdk/src/hotspot/share/utilities/compilerWarnings.hpp:#ifndef PRAGMA_DIAG_PUSH jdk/src/hotspot/share/utilities/compilerWarnings.hpp:#define PRAGMA_DIAG_PUSH jdk/src/hotspot/share/utilities/xmlstream.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/share/classfile/classFileError.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/share/classfile/classFileParser.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/share/jvmci/jvmciRuntime.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/share/jvmci/jvmciRuntime.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp:PRAGMA_DIAG_PUSH jdk/src/hotspot/os/linux/osContainer_linux.cpp:PRAGMA_DIAG_PUSH
-- Andrew :)
Senior Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com)
Web Site: http://fuseyism.com Twitter: https://twitter.com/gnu_andrew_java PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net) Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
- Previous message: RFR: 8202082: Remove explicit CMS checks in CardTableBarrierSetAssembler
- Next message: RFR: build pragma error with gcc 4.4.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]