[Bug middle-end/98465] Bogus -Wstringop-overread with -std=gnu++20 -O2 and std::string::insert

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 15 10:02:18 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465

--- Comment #37 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Please report a separate bug for vstring then.

(Your segfaults are probably because you're using c_str() on a temporary
string, so accessing the pointer after the temporary goes out of scope.)


More information about the Gcc-bugs mailing list