https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77340
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Ah no, as I thought ... main.cpp includes a standard library header before _GLIBCXX_DEBUG is defined, and defining it after that is too late. You need to define _GLIBCXX_DEBUG on the command line, or before including any other headers.