[Bug libstdc++/54924] Warn for std::string constructor with wrong size

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 15 21:30:07 GMT 2021


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


More information about the Gcc-bugs mailing list