https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95496
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #2) > The instrumentation added by the sanitizers is known to lead to introducing > invalid code (typically by jump threading) that triggers spurious warnings. I don't think this is accurate description, the instrumentation doesn't lead to introduction of any invalid code, all it leads to is due to the instrumentation some code is less optimized. It is the property of jump threading that it often can result in code that will actually never be executed (i.e. dead code), that can happen easily both with sanitization or if one adds whatever the sanitizer adds by hand. And then the question is if the compiler is able to find out the code is dead and optimize it away before these warnings warn about it.