re PR libstdc++/19510 ([3.3 only] Uninitialized pointers in iterators)
PR libstdc++/19510 * include/bits/stl_list.h (_List_iterator): Initialize _M_node in constructor. (_List_const_iterator): Likewise. * include/bits/stl_tree.h (_Rb_tree_iterator): Likewise. (_Rb_tree_const_iterator): Likewise. * testsuite/23_containers/map/operators/1_neg.cc: Adjust line numbers. * testsuite/23_containers/set/operators/1_neg.cc: Likewise. From-SVN: r94002
This commit is contained in:
parent
75c97b449c
commit
a7a4444157
@ -1,3 +1,15 @@
|
||||
2005-01-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR libstdc++/19510
|
||||
* include/bits/stl_list.h (_List_iterator): Initialize _M_node
|
||||
in constructor.
|
||||
(_List_const_iterator): Likewise.
|
||||
* include/bits/stl_tree.h (_Rb_tree_iterator): Likewise.
|
||||
(_Rb_tree_const_iterator): Likewise.
|
||||
|
||||
* testsuite/23_containers/map/operators/1_neg.cc: Adjust line numbers.
|
||||
* testsuite/23_containers/set/operators/1_neg.cc: Likewise.
|
||||
|
||||
2005-01-20 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* testsuite/Makefile.am (check-compile): New.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// List implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -119,7 +119,8 @@ namespace _GLIBCXX_STD
|
||||
typedef _Tp* pointer;
|
||||
typedef _Tp& reference;
|
||||
|
||||
_List_iterator() { }
|
||||
_List_iterator()
|
||||
: _M_node() { }
|
||||
|
||||
_List_iterator(_List_node_base* __x)
|
||||
: _M_node(__x) { }
|
||||
@ -195,7 +196,8 @@ namespace _GLIBCXX_STD
|
||||
typedef const _Tp* pointer;
|
||||
typedef const _Tp& reference;
|
||||
|
||||
_List_const_iterator() { }
|
||||
_List_const_iterator()
|
||||
: _M_node() { }
|
||||
|
||||
_List_const_iterator(const _List_node_base* __x)
|
||||
: _M_node(__x) { }
|
||||
|
@ -161,7 +161,8 @@ namespace std
|
||||
typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
|
||||
typedef _Rb_tree_node<_Tp>* _Link_type;
|
||||
|
||||
_Rb_tree_iterator() { }
|
||||
_Rb_tree_iterator()
|
||||
: _M_node() { }
|
||||
|
||||
_Rb_tree_iterator(_Link_type __x)
|
||||
: _M_node(__x) { }
|
||||
@ -231,7 +232,8 @@ namespace std
|
||||
typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
|
||||
typedef const _Rb_tree_node<_Tp>* _Link_type;
|
||||
|
||||
_Rb_tree_const_iterator() { }
|
||||
_Rb_tree_const_iterator()
|
||||
: _M_node() { }
|
||||
|
||||
_Rb_tree_const_iterator(_Link_type __x)
|
||||
: _M_node(__x) { }
|
||||
|
@ -41,5 +41,5 @@ void test01()
|
||||
test &= itr == mapByName.end(); // { dg-error "no" }
|
||||
}
|
||||
|
||||
// { dg-error "candidates are" "" { target *-*-* } 208 }
|
||||
// { dg-error "candidates are" "" { target *-*-* } 212 }
|
||||
// { dg-error "candidates are" "" { target *-*-* } 209 }
|
||||
// { dg-error "candidates are" "" { target *-*-* } 213 }
|
||||
|
@ -39,5 +39,5 @@ void test01()
|
||||
test &= itr == setByName.end(); // { dg-error "no" }
|
||||
}
|
||||
|
||||
// { dg-error "candidates are" "" { target *-*-* } 281 }
|
||||
// { dg-error "candidates are" "" { target *-*-* } 285 }
|
||||
// { dg-error "candidates are" "" { target *-*-* } 283 }
|
||||
// { dg-error "candidates are" "" { target *-*-* } 287 }
|
||||
|
Loading…
Reference in New Issue
Block a user