This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/17012] std::list's function, remove, looks like it is reading memory that has been freed.


------- Additional Comments From debrak at sgi dot com  2004-08-12 21:07 -------
My compile does not work if I replace var.remove(*i0) with var.erase(i0):

%  gcc -g -Wall -o bug1.o -c bug1.cpp
bug1.cpp: In function `int main()':
bug1.cpp:22: error: no matching function for call to `std::list<int,
std::allocator<int> >::remove(std::_List_iterator<int>&)'
/usr/local/gcc-3.4.1/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../include/c++/3.4.1/bits/list.tcc:174:
note: candidates are: void std::list<_Tp, _Alloc>::remove(const _Tp&) [with _Tp
= int, _Alloc = std::allocator<int>]




-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]