https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109891
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #8 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #7) > Oops, if I'd typed PEDASSERT not PEDANTIC, it would be a deliberate choice > ;-) > > Yes, I think PEDASSERT fits better, based on the documented meaning of it > (which even mentions the std::string((const char*)nullptr) case): > https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_semantics.html Ccan we add a "pednonnull" attribute or something to produce a -Wnonnull warning like the nonnull attribute but w/o affecting code generation as well? I remember we've discussed "adding nonnull attribute for basic_ostream::operator<<" and the idea was rejected because the nonnull attribute would throw away the null pointer check.