https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54924
--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #14) > Created attachment 43350 [details] > Patch to use __builtin_object_size in std::string > > So it isn't lost, here's a prototype I was working on last year (which only > helps if you use -Wsystem-headers). Huh, I forgot about this patch and then reinvented that wheel: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581376.html