comparison src/share/vm/opto/node.cpp @ 14366:7907932bdd99

8033215: clang: node.cpp:284 IDX_INIT macro use uninitialized field _out Reviewed-by: twisti, kvn
author henryjen
date Tue, 11 Feb 2014 21:32:19 -0800
parents de6a9e811145
children 28f281e8de1d
comparison
equal deleted inserted replaced
14342:78fde43dc07d 14366:7907932bdd99
283 // (Aren't you thankful that Java finals don't require so many tricks?) 283 // (Aren't you thankful that Java finals don't require so many tricks?)
284 #define IDX_INIT(req) this->Init((req), (Compile*) this->_out) 284 #define IDX_INIT(req) this->Init((req), (Compile*) this->_out)
285 #ifdef _MSC_VER // the IDX_INIT hack falls foul of warning C4355 285 #ifdef _MSC_VER // the IDX_INIT hack falls foul of warning C4355
286 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list 286 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
287 #endif 287 #endif
288 #ifdef __clang__
289 #pragma clang diagnostic push
290 #pragma GCC diagnostic ignored "-Wuninitialized"
291 #endif
288 292
289 // Out-of-line code from node constructors. 293 // Out-of-line code from node constructors.
290 // Executed only when extra debug info. is being passed around. 294 // Executed only when extra debug info. is being passed around.
291 static void init_node_notes(Compile* C, int idx, Node_Notes* nn) { 295 static void init_node_notes(Compile* C, int idx, Node_Notes* nn) {
292 C->set_node_notes_at(idx, nn); 296 C->set_node_notes_at(idx, nn);
465 _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this); 469 _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
466 _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this); 470 _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
467 _in[5] = n5; if (n5 != NULL) n5->add_out((Node *)this); 471 _in[5] = n5; if (n5 != NULL) n5->add_out((Node *)this);
468 _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this); 472 _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this);
469 } 473 }
474
475 #ifdef __clang__
476 #pragma clang diagnostic pop
477 #endif
470 478
471 479
472 //------------------------------clone------------------------------------------ 480 //------------------------------clone------------------------------------------
473 // Clone a Node. 481 // Clone a Node.
474 Node *Node::clone() const { 482 Node *Node::clone() const {