8033215: clang: node.cpp:284 IDX_INIT macro use uninitialized field _out
authorhenryjen
Tue, 11 Feb 2014 21:32:19 -0800
changeset 22782 a3b1d68b373d
parent 22759 d2c32004414f
child 22783 714fab6d0877
child 22784 f264891fc7a8
child 22786 86644d9539c2
8033215: clang: node.cpp:284 IDX_INIT macro use uninitialized field _out Reviewed-by: twisti, kvn
hotspot/src/share/vm/opto/node.cpp
--- a/hotspot/src/share/vm/opto/node.cpp	Tue Feb 11 10:05:02 2014 -0800
+++ b/hotspot/src/share/vm/opto/node.cpp	Tue Feb 11 21:32:19 2014 -0800
@@ -285,6 +285,10 @@
 #ifdef _MSC_VER // the IDX_INIT hack falls foul of warning C4355
 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
 #endif
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
 
 // Out-of-line code from node constructors.
 // Executed only when extra debug info. is being passed around.
@@ -468,6 +472,10 @@
   _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this);
 }
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
 
 //------------------------------clone------------------------------------------
 // Clone a Node.