https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78817
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, users that want this to be diagnosed reliably already can use -fsanitize={returns-,}nonnull-attribute So I think it is better to warn only about the obvious cases with very low false positive rate, and leave the rest to the runtime. Because there is really nothing wrong on the testcases from profiledbootstrap (which is meant to be supported without --disable-werror), and more importantly it is hard to figure out what actually might be wrong and how to work around the false positives. The PR bootstrap/78817 * vec.h (vec<T, A, vl_embed>::quick_grow_cleared): Assert postcondition. ( vec<T, va_heap, vl_ptr>::safe_grow_cleared): Ditto. patch looks like alchemy, slows things actually down (and will not help with --disable-checking anyway).