http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26458
Ian Lance Taylor <ian at airs dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian at airs dot com --- Comment #11 from Ian Lance Taylor <ian at airs dot com> 2011-03-13 06:04:06 UTC --- I don't think the C++ standard requires this behaviour at all when using operator<< with NULL. The standard says that a pointer value is required to be non-NULL. That means that passing a pointer value of NULL is undefined behaviour. The standard imposes no requirement at all. I think it would be much better if libstdc++ printed "(null)" here as the glibc printf function does. If that it not acceptable for some odd reason, then I think we should throw an exception. I think the current behaviour is worse than useless in practice.