From: Martin Liska Date: Wed, 26 Oct 2022 11:07:57 +0000 (+0200) Subject: docs: document sanitizers can trigger warnings X-Git-Tag: basepoints/gcc-14~3668 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f9c071324eff2222249b23a7531e447fc17d928;p=thirdparty%2Fgcc.git docs: document sanitizers can trigger warnings PR sanitizer/107298 gcc/ChangeLog: * doc/invoke.texi: Document sanitizers can trigger warnings. --- diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9f0e5460861b..c0ca76544e8e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -16509,6 +16509,10 @@ by this option. @end table +Note the enabled sanitizer options tend to increase a false-positive rate +of selected warnings, most notably @option{-Wmaybe-uninitialized}. +And thus we recommend to disable @option{-Werror}. + While @option{-ftrapv} causes traps for signed overflows to be emitted, @option{-fsanitize=undefined} gives a diagnostic message. This currently works only for the C family of languages.