[Bug libstdc++/59170] pretty printers: end iterator invalid pointer
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 13 13:54:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think it's simply wrong to automatically dereference iterators. GDB doesn't
do that when printing pointers, so why do the pretty printers do it for
iterators?
There are loads of cases where it does the wrong thing, not only for
past-the-end iterators but also for default-constructed ones that might contain
uninitialized pointers.
More information about the Gcc-bugs
mailing list