RFR: 8314258: checked_cast doesn't properly check some cases
Afshin Zafari
azafari at openjdk.org
Mon Feb 9 21:27:33 UTC 2026
On Thu, 5 Feb 2026 00:03:20 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this addition of the `integer_cast` utility.
>
> Details in first comment, to avoid email spamming from automatic messages.
>
> Testing: mach5 tier1-5 with `checked_cast` for integral types changed to call
> the new `integer_cast`. Addition of `integer_cast` includes gtests.
> is correct. That _positive_ value cannot be represented in an int32_t.
> How is that behavior not clear from the description?
Using explicit cast as in the lines at the bottom of the test makes the conversion possible. How the `(int32_t)0xFFFFFFFF` compiled/converted?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29582#issuecomment-3870621284
More information about the hotspot-dev
mailing list