[Bug c++/41480] std::map.erase on cygwin

2009-09-28 Thread lifelong830114 at gmail dot com
--- Comment #6 from lifelong830114 at gmail dot com 2009-09-28 12:46 --- (In reply to comment #5) > The code is invalid everywhere for the reason you mentioned, on linux just > happens by chance to not segfault. Ok, I see. Thank you very much. -- lifelong830114 at gmail dot com ch

[Bug c++/41480] std::map.erase on cygwin

2009-09-28 Thread paolo dot carlini at oracle dot com
--- Comment #5 from paolo dot carlini at oracle dot com 2009-09-28 09:39 --- The code is invalid everywhere for the reason you mentioned, on linux just happens by chance to not segfault. -- paolo dot carlini at oracle dot com changed: What|Removed

[Bug c++/41480] std::map.erase on cygwin

2009-09-28 Thread lifelong830114 at gmail dot com
--- Comment #4 from lifelong830114 at gmail dot com 2009-09-28 09:31 --- (In reply to comment #3) > In any case, the code is invalid, try building (and then running) with > -D_GLIBCXX_DEBUG to see the problem. This way, for example, is fine: > for (; it != mymap.end() ; /* it++ */) {

[Bug c++/41480] std::map.erase on cygwin

2009-09-28 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-09-28 09:17 --- In any case, the code is invalid, try building (and then running) with -D_GLIBCXX_DEBUG to see the problem. This way, for example, is fine: for (; it != mymap.end() ; /* it++ */) { mymap.erase((*it++).fir

[Bug c++/41480] std::map.erase on cygwin

2009-09-27 Thread lifelong830114 at gmail dot com
--- Comment #2 from lifelong830114 at gmail dot com 2009-09-28 01:39 --- The error occured on cygwin not linux, and I referenced http://gcc.gnu.org/gcc-4.2/buildstat.html -- lifelong830114 at gmail dot com changed: What|Removed |Added ---

[Bug c++/41480] std::map.erase on cygwin

2009-09-27 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2009-09-27 10:28 --- GCC 4.2 is no longer maintained. It works for me with GCC 4.2.4 on i?86-linux. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added -