RFR: Fix clang build warnings
Aleksey Shipilev
shade at redhat.com
Thu Nov 1 14:50:43 UTC 2018
Even though C++ operator precedence rules make this right, clang still complains about mixing && and
||. This makes precedence explicit:
diff -r b6406cc37101 -r b03bb4c0d6e8 src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Tue Oct 30 17:17:00 2018 +0100
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Thu Nov 01 15:46:15 2018 +0100
@@ -3169,7 +3169,7 @@
if (n == NULL ||
n->is_Allocate() ||
n->bottom_type() == TypePtr::NULL_PTR ||
- n->bottom_type()->make_oopptr() != NULL && n->bottom_type()->make_oopptr()->const_oop() !=
NULL) {
+ (n->bottom_type()->make_oopptr() != NULL && n->bottom_type()->make_oopptr()->const_oop() !=
NULL)) {
return NotNeeded;
}
if (n->is_Phi() ||
Testing: Mac OS X builds
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list