RFR: 8330524: Linux ppc64le compile warning with clang in os_linux_ppc.cpp
Martin Doerr
mdoerr at openjdk.org
Wed Apr 17 17:10:59 UTC 2024
On Wed, 17 Apr 2024 15:04:03 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> When building with clang on Linux ppc64le, we run into this warning as error :
>
> /open_jdk/jdk_test/jdk/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp:257:17: error: converting the result of '?:' with integer constants to a boolean always evaluates to 'true' [-Werror,-Wtautological-constant-compare]
> else if ((sig == USE_POLL_BIT_ONLY ? SIGTRAP : SIGSEGV) &&
> ^
> 1 error generated.
Thanks for fixing it! The current code is wrong and only works because the succeeding checks are strong enough.
-------------
Marked as reviewed by mdoerr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18818#pullrequestreview-2006656103
More information about the hotspot-runtime-dev
mailing list