[Bug libstdc++/43525] New: Useless condition: if (__x-_M_right != __y)

2010-03-25 Thread ninive at gmx dot at
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



[Bug libstdc++/43525] Useless condition: if (__x-_M_right != __y)

2010-03-25 Thread ninive at gmx dot at


--- Comment #3 from ninive at gmx dot at  2010-03-25 21:30 ---
Hi Paolo,
Yes, you are right, I forgot the NULL value.
Sorry for disturbing.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43525



[Bug c++/36547] New: internal compiler error: Segmentation fault

2008-06-16 Thread ninive at gmx dot at
This works with gcc, but not with g++:


int main()
{
const char *x[] = (const char *[]){ test,blabla };
}


-- 
   Summary: internal compiler error: Segmentation fault
   Product: gcc
   Version: 3.4.5
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ninive at gmx dot at


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36547



[Bug c++/36547] internal compiler error: Segmentation fault

2008-06-16 Thread ninive at gmx dot at


--- Comment #2 from ninive at gmx dot at  2008-06-16 09:11 ---
You are right. Sorry for disturbing.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36547