docs: update: document sanitizers can trigger warnings

gcc/ChangeLog:

	* doc/invoke.texi: Improve wording.

Co-Authored-By: Gerald Pfeifer <gerald@pfeifer.com>
This commit is contained in:
Martin Liska 2022-11-07 09:54:09 +01:00
parent 33dc1bacc3
commit a8fb90eb39

View file

@ -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.