RFR: 8256633: Fix product build on Windows+Arm64
Bernhard Urban-Forster
burban at openjdk.java.net
Fri Nov 20 10:17:06 UTC 2020
On Thu, 19 Nov 2020 09:30:11 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Fix this warning:
>> C:\work\openjdk-jdk\src\hotspot\cpu\aarch64\assembler_aarch64.hpp(508): error C2220: the following warning is treated as an error
>> C:\work\openjdk-jdk\src\hotspot\cpu\aarch64\assembler_aarch64.hpp(508): warning C4390: ';': empty controlled statement found; is this the intent?
>>
>> Thanks to @magicus to bring that to my attention.
>
> src/hotspot/cpu/aarch64/assembler_aarch64.hpp line 509:
>
>> 507: if (_ext.shift() > 0) {
>> 508: assert(_ext.shift() == (int)size, "bad shift");
>> 509: }
>
> D'oh. So this is semantically the same as:
>
> assert(_ext.shift() <= 0 || _ext.shift() == (int)size, "bad shift");
>
> ...or, if we expect shift to be non-negative:
>
> assert(_ext.shift() == 0 || _ext.shift() == (int)size, "bad shift");
Indeed. Are you suggesting to change it? I usually try to avoid changing code style when doing a fix of such a nature.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1312
More information about the hotspot-compiler-dev
mailing list