https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jan Kratochvil from comment #11) > (In reply to Jonathan Wakely from comment #9) > > Most developers don't even know the debug mode exists. > > That's a problem communicating it to users. -O0 -g would be best to always > use -D_GLIBCXX_DEBUG if there is a way how to solve the ABI compatibility > problem. That's a HUGE if. There is no plan to make debug mode ABI compatibile, so it's impossible to use in many cases (e.g. linking to pre-built third-party libs that use C++ types in the API). Anyway, I am testing some patches to improve printing of invalid iterators (both debug mode and normal).