This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/59675] -D_GLIBCXX_DEBUG asserts to stdout (it should stderr)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]