RFR: 8322806: Eliminate -Wparentheses warnings in aarch64 code [v2]
Kim Barrett
kbarrett at openjdk.org
Mon Jan 8 07:33:52 UTC 2024
On Wed, 3 Jan 2024 13:23:56 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp line 198:
>>
>>> 196: && fp() == other.fp()
>>> 197: && pc() == other.pc();
>>> 198: assert(!ret || (ret && cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");
>>
>> Well... Since `||` is short-cutting, then on the right side of `||`, we can be sure that `!ret` was `false` (shortcut not taken), which means `ret` was `true`, which means `ret &&` is redundant?
>
> I agree:
> https://github.com/openjdk/jdk/pull/17210#pullrequestreview-1800130145
Agreed, and updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17210#discussion_r1444239594
More information about the hotspot-dev
mailing list