The variable "__y" in _Rb_tree_increment (src/tree.cc) is always equal to "__x->_M_parent. Therefore the condition means (which is alwys true):
if (__x->_M_right != __x->_M_parent) The source: _Rb_tree_node_base* _Rb_tree_increment(_Rb_tree_node_base* __x) throw () { if (__x->_M_right != 0) { __x = __x->_M_right; while (__x->_M_left != 0) __x = __x->_M_left; } else { _Rb_tree_node_base* __y = __x->_M_parent; // y == x->parent while (__x == __y->_M_right) { __x = __y; __y = __y->_M_parent; // y == x->parent } if (__x->_M_right != __y) // if( x->right != x->parent ) __x = __y; } return __x; } -- Summary: Useless condition: "if (__x->_M_right != __y)" Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ninive at gmx dot at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43525