RFR: 8314258: Add integer_cast for checking conversions don't change the value [v6]

Kim Barrett kbarrett at openjdk.org
Wed Feb 25 20:35:36 UTC 2026


> 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.

Kim Barrett has updated the pull request incrementally with two additional commits since the last revision:

 - examples using permit_tautology
 - enum instead of bool to control tautology behavior

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29582/files
  - new: https://git.openjdk.org/jdk/pull/29582/files/b132a37f..5b377994

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29582&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29582&range=04-05

  Stats: 32 lines in 5 files changed: 17 ins; 0 del; 15 mod
  Patch: https://git.openjdk.org/jdk/pull/29582.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29582/head:pull/29582

PR: https://git.openjdk.org/jdk/pull/29582


More information about the hotspot-dev mailing list