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

Matthias Baesken mbaesken at openjdk.org
Tue May 16 07:25:59 UTC 2023


On Mon, 15 May 2023 12:25:29 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> What is the warning here?  Note that we've already turned off `-Wshift-negative-value` for gcc and xlc
>> (but not for clang, for some reason).  See `# Disabled warnings` in CompileJvm.gmk.
>
> 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 .

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

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


More information about the hotspot-dev mailing list