RFR: 8314258: checked_cast doesn't properly check some cases [v2]
Kim Barrett
kbarrett at openjdk.org
Mon Feb 9 21:27:54 UTC 2026
On Thu, 5 Feb 2026 12:42:27 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>>
>> more testing
>
> test/hotspot/gtest/utilities/test_integerCast.cpp line 1:
>
>> 1: /*
>
> Shouldn't we test the `integer_cast` function in this file?
Yeah, you are right. I was thinking there isn't much to test beyond what's
provided by `is_always_integer_convertible` and `is_integer_convertible`. But
we should also test the value of `integer_cast` is as expected, and
suppressing the tautology check works, and constexpr works, and have death
tests for out of range conversions. Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29582#discussion_r2779663200
More information about the hotspot-dev
mailing list