https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65049
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, unfortunately the C++ standard doesn't define those members in terms of the C library calls they correspond to, and doesn't say anything special about null pointers, so they're required to handle null (I'm considering whether that could be considered a defect, we might want to forbid nulls so I'll raise that with the committee).