RFR: 8254072: AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build [v2]

Bernhard Urban-Forster burban at openjdk.java.net
Thu Oct 15 08:57:28 UTC 2020


On Mon, 12 Oct 2020 10:29:11 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Bernhard Urban-Forster has updated the pull request with a new target base due to a merge or a rebase. The pull request
>> now contains 18 commits:
>>  - Merge remote-tracking branch 'upstream/master' into 8254072-fix-windows-arm64-warnings
>>  - ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1441): warning C4267: 'argument': conversion from 'size_t' to
>>    'int', possible loss of data
>>    ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1446): warning C4267: 'argument': conversion from 'size_t' to
>>    'int', possible loss of data ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1654): warning C4267: 'argument':
>>    conversion from 'size_t' to 'int', possible loss of data
>>  - Revert changes for "warning C4146: unary minus operator applied to unsigned type, result still unsigned"
>>  - msvc: disable unary minus warning for unsigned types
>>  - ./src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp(1123): warning C4267: 'initializing': conversion
>>    from 'size_t' to 'int', possible loss of data
>>    ./src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp(1123): warning C4267: 'initializing': conversion
>>    from 'size_t' to 'const int', possible loss of data
>>  - ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1312): warning C4267: 'argument': conversion from 'size_t' to
>>    'unsigned int', possible loss of data
>>    ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1370): warning C4267: 'argument': conversion from 'size_t' to
>>    'int', possible loss of data ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1441): warning C4146: unary minus
>>    operator applied to unsigned type, result still unsigned ./src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp(1441):
>>    warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
>>  - ./src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp(2472): warning C4312: 'type cast': conversion from 'unsigned int'
>>    to 'address' of greater size
>>  - ./src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp(1527): warning C4267: 'argument': conversion from 'size_t' to
>>    'int', possible loss of data
>>  - ./src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(2901): warning C4267: 'initializing': conversion from 'size_t' to
>>    'int', possible loss of data
>>    ./src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(2901): warning C4267: 'initializing': conversion from 'size_t' to
>>    'const int', possible loss of data
>>  - ./src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(2756): warning C4146: unary minus operator applied to unsigned
>>    type, result still unsigned
>>  - ... and 8 more: https://git.openjdk.java.net/jdk/compare/5351ba6c...a081dfb4
>
> make/autoconf/flags-cflags.m4 line 137:
> 
>> 135:       WARNINGS_ENABLE_ALL="-W3"
>> 136:       DISABLED_WARNINGS="4800"
>> 137:       DISABLED_WARNINGS+=" 4146" # unary minus operator applied to unsigned type, result still unsigned
> 
> This change will affect *all* JDK code. I'm not sure this was intended?
> 
> If it was intended, I think you need to motivate this more explicitly.
> 
> If you only wanted to disable the warning for hotspot, the proper solution would be to add it to
> DISABLED_WARNINGS_microsoft in make/hotspot/lib/CompileJvm.gmk.

Thank you @magicus! It was indeed meant only for the hotspot part.

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

PR: https://git.openjdk.java.net/jdk/pull/530



More information about the build-dev mailing list