-
Bug
-
Resolution: Unresolved
-
P4
-
21
Configuring and compiling the mainline JDK with MSVC 2019 fails after JDK-8301244:
Tools summary:
* Environment: cygwin version 3.3.3(0.341/5/3), 2021-12-03 16:35; windows version 10.0.19044.2846; prefix "/cygdrive"; root "C:\cygwin64"
* Boot JDK: openjdk version "20.0.1-internal" 2023-04-18 OpenJDK Runtime Environment (build 20.0.1-internal-adhoc..build) OpenJDK 64-Bit Server VM (build 20.0.1-internal-adhoc..build, mixed mode, sharing) (at /cygdrive/c/buildbot/jdks/jdk20)
* Toolchain: microsoft (Microsoft Visual Studio 2019)
* C Compiler: Version 19.27.29111 (at /cygdrive/c/progra~2/micros~3/2019/commun~1/vc/tools/msvc/1427~1.291/bin/hostx64/x64/cl.exe)
* C++ Compiler: Version 19.27.29111 (at /cygdrive/c/progra~2/micros~3/2019/commun~1/vc/tools/msvc/1427~1.291/bin/hostx64/x64/cl.exe)
Build:
c:\buildbot\worker\build-jdkx-windows\build\src\hotspot\share\jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp(140): error C2059: syntax error: ')'
c:\buildbot\worker\build-jdkx-windows\build\src\hotspot\share\jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp(143): error C2059: syntax error: ')'
make[3]: *** [lib/CompileJvm.gmk:147: /cygdrive/c/buildbot/worker/build-jdkx-windows/build/build/windows-x86_64-server-fastdebug/hotspot/variant-server/libjvm/objs/ageTableTracer.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
The affected code is PRAGMA_DIAG_PUSH/POP here:
template <typename T>
inline void JfrTraceIdBits::store(jbyte bits, const T* ptr) {
assert(ptr != NULL, "invariant");
// gcc12 warns "writing 1 byte into a region of size 0" when T == Klass.
// The warning seems to be a false positive. And there is no warning for
// other types that use the same mechanisms. The warning also sometimes
// goes away with minor code perturbations, such as replacing function calls
// with equivalent code directly inlined.
PRAGMA_DIAG_PUSH
PRAGMA_STRINGOP_OVERFLOW_IGNORED
set(bits, traceid_tag_byte(ptr));
PRAGMA_DIAG_POP
}
Tools summary:
* Environment: cygwin version 3.3.3(0.341/5/3), 2021-12-03 16:35; windows version 10.0.19044.2846; prefix "/cygdrive"; root "C:\cygwin64"
* Boot JDK: openjdk version "20.0.1-internal" 2023-04-18 OpenJDK Runtime Environment (build 20.0.1-internal-adhoc..build) OpenJDK 64-Bit Server VM (build 20.0.1-internal-adhoc..build, mixed mode, sharing) (at /cygdrive/c/buildbot/jdks/jdk20)
* Toolchain: microsoft (Microsoft Visual Studio 2019)
* C Compiler: Version 19.27.29111 (at /cygdrive/c/progra~2/micros~3/2019/commun~1/vc/tools/msvc/1427~1.291/bin/hostx64/x64/cl.exe)
* C++ Compiler: Version 19.27.29111 (at /cygdrive/c/progra~2/micros~3/2019/commun~1/vc/tools/msvc/1427~1.291/bin/hostx64/x64/cl.exe)
Build:
c:\buildbot\worker\build-jdkx-windows\build\src\hotspot\share\jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp(140): error C2059: syntax error: ')'
c:\buildbot\worker\build-jdkx-windows\build\src\hotspot\share\jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp(143): error C2059: syntax error: ')'
make[3]: *** [lib/CompileJvm.gmk:147: /cygdrive/c/buildbot/worker/build-jdkx-windows/build/build/windows-x86_64-server-fastdebug/hotspot/variant-server/libjvm/objs/ageTableTracer.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
The affected code is PRAGMA_DIAG_PUSH/POP here:
template <typename T>
inline void JfrTraceIdBits::store(jbyte bits, const T* ptr) {
assert(ptr != NULL, "invariant");
// gcc12 warns "writing 1 byte into a region of size 0" when T == Klass.
// The warning seems to be a false positive. And there is no warning for
// other types that use the same mechanisms. The warning also sometimes
// goes away with minor code perturbations, such as replacing function calls
// with equivalent code directly inlined.
PRAGMA_DIAG_PUSH
PRAGMA_STRINGOP_OVERFLOW_IGNORED
set(bits, traceid_tag_byte(ptr));
PRAGMA_DIAG_POP
}
- relates to
-
JDK-8301244 Tidy up compiler specific warnings files
-
- Resolved
-