RFR: 8371162: Compiler warns about implicit cast from long to int in shift operation [v4]

Archie Cobbs acobbs at openjdk.org
Tue Feb 3 17:16:18 UTC 2026


On Tue, 3 Feb 2026 17:01:43 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> It's true that there's no loss of precision. One possible thing we might want to do (low priority) is to issue a lint warning if we see a constant value that exceeds the max shift amount.

Indeed... but I think that should already be taken care of (separately) by [JDK-5038439](https://bugs.openjdk.org/browse/JDK-5038439) (PR #27102), no?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28180#discussion_r2760132472


More information about the compiler-dev mailing list