RFR: 5038439: Warning message for literal shift amounts outside the canonical domain [v4]
Archie Cobbs
acobbs at openjdk.org
Thu Nov 6 21:03:02 UTC 2025
On Wed, 5 Nov 2025 15:37:54 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
> > Maybe the line needs to be draw closer to "the code is probably buggy/highly suspicious".
>
> I'm OK with this more conservative approach, which should satisfy all the "real hackers": instead of warning for values outside of the range `[0,n)` (where `n` is 32 or 64), only warn for values outside of the range `(-n, n)`.
I went ahead and updated this PR and the CSR to not warn about negative shifts that are otherwise in range. Please take a look at both and let me know what you guys think.
We can always turn the screws harder in the future if appropriate.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27102#discussion_r2500850339
More information about the build-dev
mailing list