https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119429
--- Comment #15 from Desmond Rhodes <desmond.rhodes at outlook dot com> --- (In reply to Jonathan Wakely from comment #11) > Clang documents how to silence these diagnostics, which are NOT undefined > behaviour. > > The conversion to size_t is 100% portable and well defined by the standard. > I wrote it that way intentionally, and it behaves exactly as it's supposed > to. > > https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#silencing- > unsigned-integer-overflow Yeah, I know that I can silence it for the whole program. But I don't want to silence it for the whole program, because I need it to catch bugs in my own program. I only want to disable it for the libstdc++, which is well defined.