This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/646: stl map hangs while erasing end()
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/646: stl map hangs while erasing end()
- From: kzhang at vill dot com
- Date: 16 Oct 2000 14:46:10 -0000
- Reply-To: kzhang at vill dot com
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, kzhang@vill.com
>Number: 646
>Category: c++
>Synopsis: stl map hangs while erasing end()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 16 07:56:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Kurt Zhang
>Release: gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:
Linux 2.2.14-5.0
>Description:
when I tried to erase a map's end iterator,
the program hangs. But according Stroustrup's The C++
Programming Language, third edition, "Erasing end()
is harmless." (pp 489) Please see the attached file
for detail. This problem can be repeated on all associative
containers.
>How-To-Repeat:
Compile the attached file, and run it. It will hang.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="report_map.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="report_map.cc"
I2luY2x1ZGUgPG1hcD4KCmludCBtYWluKCkKewoJbWFwPGludCxpbnQ+IG07CgltLmVyYXNlKG0u
ZW5kKCkpOwp9Cg==