This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/59675] -D_GLIBCXX_DEBUG asserts to stdout (it should stderr)
- From: "jan.kratochvil at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 06 May 2015 15:43:05 +0000
- Subject: [Bug libstdc++/59675] -D_GLIBCXX_DEBUG asserts to stdout (it should stderr)
- Auto-submitted: auto-generated
- References: <bug-59675-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59675
--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
gcc-4.9.2-6.fc21.x86_64:
gcc-5.1.1-1.fc23.x86_64
#include <debug/string>
int main() { __gnu_debug::string s((const char *)0); }
g++ -o gcc59675b gcc59675b.C -Wall -g -D_GLIBCXX_DEBUG
-D_GLIBCXX_DEBUG_PEDANTIC
./gcc59675b 2>/dev/null
/usr/include/c++/5.1.1/debug/functions.h:315: const _CharT*
__gnu_debug::__check_string(const _CharT*) [with _CharT = char]: Assertion '__s
!= 0' failed.
Aborted
I was hitting this issue often on some older GCC versions but now I find it
very difficult to reproduce. __glibcxx_assert() is probably no longer too much
used. For some reason I could no longer even reproduce it with std::string.