RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

Kim Barrett kbarrett at openjdk.org
Wed May 17 09:58:45 UTC 2023


On Tue, 16 May 2023 07:22:44 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> I think disabling the warning is fine. Alternatively, we could `#define MIN_INT16 -32768` somewhere or introduce `const int16_t min_int16 = (int16_t)1 << (sizeof(int16_t)*BitsPerByte-1);`. What do you prefer, Kim?
>
> Hi Martin/Joachim , I like the MIN_INT16 define idea Martin proposed, makes the code more readable and makes the warning go away .

Use `INT16_MIN`, which is in <stdint.h>, which we already use.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13953#discussion_r1196239520


More information about the hotspot-dev mailing list