RFR: 8322817: RISC-V: Eliminate -Wparentheses warnings in riscv code [v2]

Kim Barrett kbarrett at openjdk.org
Mon Jan 8 01:41:47 UTC 2024


On Mon, 8 Jan 2024 01:38:27 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Please review this change to eliminate some -Wparentheses warnings. This
>> involved simply adding a few parentheses to make some implicit operator
>> precedence explicit.
>> 
>> Testing: Local (linux-x64) cross-build for linux-riscv with this change plus
>> -Wparentheses enabled and other changes to allow that to work.
>> 
>> Requesting someone from the riscv porters to properly test this.
>
> Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Merge branch 'master' into riscv-wparentheses
>  - simplify frame::equal assert
>  - fix -Wparentheses warnings in riscv code

src/hotspot/cpu/riscv/frame_riscv.inline.hpp line 189:

> 187:               fp() == other.fp() &&
> 188:               pc() == other.pc();
> 189:   assert(!ret || (cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");

Per comments in reviews for similar changes for other ports, I've removed the unnecessary "ret &&".
Builds fine, but should probably be (re)tested by a port maintainer.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17216#discussion_r1444116349


More information about the hotspot-dev mailing list