Trivial MacOS compiler warning
Aleksey Shipilev
shade at redhat.com
Thu Feb 1 09:32:20 UTC 2018
On 02/01/2018 10:00 AM, Lennart Börjeson wrote:
> Hi,
>
> I get the following trivial compiler warning when building Shenandoah on MacOS. Not important, but should perhaps be fixed anyway.
>
>
> Compiling 11 properties into resource bundles for jdk.management.agent
> /Users/lennartb/RaT/openJDK/shenandoah-jdk10/src/hotspot/share/ci/ciInstanceKlass.cpp:186:21: warning: '&&' within '||' [-Wlogical-op-parentheses]
> if (!(offset >= 0 && offset < layout_helper() || (offset == BrooksPointer::byte_offset() && UseShenandoahGC))) {
> ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
> /Users/lennartb/RaT/openJDK/shenandoah-jdk10/src/hotspot/share/ci/ciInstanceKlass.cpp:186:21: note: place parentheses around the '&&' expression to silence this warning
> if (!(offset >= 0 && offset < layout_helper() || (offset == BrooksPointer::byte_offset() && UseShenandoahGC))) {
> ^
> ( )
Thanks! Is that the only warning we have during the Mac OS build?
Can be fixed like this:
http://cr.openjdk.java.net/~shade/shenandoah/build/macos-1/webrev.01/
-Aleksey
More information about the shenandoah-dev
mailing list