https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't know the original reason for handling null pointers here, but it's consistent with glibc's printf which prints "(null)" when a null pointer is provided for a %s specifier. Removing this longstanding behaviour now could break an unnknown number of programs which are (impicitly or explicitly) relying on this behaviour of libstdc++. It's not at all clear to me that crashing is preferable.