RFR: 8312121: Fix -Wconversion warnings in tribool.hpp [v3]

David Holmes dholmes at openjdk.org
Tue Jul 25 04:46:50 UTC 2023


On Tue, 25 Jul 2023 03:05:49 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Assigning _value first, and then doing _value | 2 doesn't get -Wconversion warnings.  Also, reduced include file inclusion a little.
>> Tested with tier1 on linux-x64-debug, windows-x64-debug, macos-aarch64-debug
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Missed TriBoolAssigner case.

Okay. Beats me why the compiler can't tell that the result of the OR fits in two bits without having to do the `& 3`.

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14892#pullrequestreview-1544627104


More information about the hotspot-dev mailing list