docs: document sanitizers can trigger warnings
authorMartin Liska <mliska@suse.cz>
Wed, 26 Oct 2022 11:07:57 +0000 (13:07 +0200)
committerMartin Liska <mliska@suse.cz>
Fri, 28 Oct 2022 07:16:24 +0000 (09:16 +0200)
PR sanitizer/107298

gcc/ChangeLog:

* doc/invoke.texi: Document sanitizers can trigger warnings.

gcc/doc/invoke.texi

index 9f0e546..c0ca765 100644 (file)
@@ -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.