From: Martin Liska Date: Mon, 7 Nov 2022 08:54:09 +0000 (+0100) Subject: docs: update: document sanitizers can trigger warnings X-Git-Tag: basepoints/gcc-14~3459 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8fb90eb3949bfb101bd6f50f24a029e10119591;p=thirdparty%2Fgcc.git docs: update: document sanitizers can trigger warnings gcc/ChangeLog: * doc/invoke.texi: Improve wording. Co-Authored-By: Gerald Pfeifer --- diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4a0fbca938ef..94a2e20cfc11 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -16502,9 +16502,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}. +Note that sanitizers tend to increase the rate of false positive +warnings, most notably those around @option{-Wmaybe-uninitialized}. +We recommend against combining @option{-Werror} and [the use of] +sanitizers. While @option{-ftrapv} causes traps for signed overflows to be emitted, @option{-fsanitize=undefined} gives a diagnostic message.