https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96599
--- Comment #4 from Gabriel Ravier <gabravier at gmail dot com> --- That makes sense, I had forgotten it was UB and Clang didn't seem to diagnose this in any way, and I must have forgotten to check with GCC.