https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118720
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- Did you adjust the code to use std::span? I didn't say that just adding -fhardened will diagnose anything. My point is that using std::span<char> instead of char* will make b-1 ill-formed, and b[-1] will abort.