RFR: 8313554: Fix -Wconversion warnings for ResolvedFieldEntry [v2]
Dean Long
dlong at openjdk.org
Thu Aug 3 22:49:33 UTC 2023
On Thu, 3 Aug 2023 20:53:56 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> The recent change in [JDK-8301996](https://bugs.openjdk.org/browse/JDK-8301996) added more -Wconversion warnings that are addressed in this patch. The aforementioned change has overlooked inconsistencies with the types used by `ResolvedFieldEntry` and the method `fill_in()`. Verified with tier 1-4 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Change to checked_cast
src/hotspot/share/interpreter/rewriter.cpp line 188:
> 186: int cp_index = Bytes::get_Java_u2(p);
> 187: int field_entry_index = _cp_map.at(cp_index);
> 188: Bytes::put_native_u2(p, checked_cast<u2>(field_entry_index));
I would have put the checked_cast on the initialization and not the use, but this is OK too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15126#discussion_r1283789662
More information about the build-dev
mailing list