https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...
What would catch this would be a C++ compiler warning. I filed bug reports against both GCC and LLVM asking for one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263
https://github.com/llvm/llvm-project/issues/121427
https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...
What would catch this would be a C++ compiler warning. I filed bug reports against both GCC and LLVM asking for one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263
https://github.com/llvm/llvm-project/issues/121427