From 3f9c071324eff2222249b23a7531e447fc17d928 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 26 Oct 2022 13:07:57 +0200 Subject: docs: document sanitizers can trigger warnings PR sanitizer/107298 gcc/ChangeLog: * doc/invoke.texi: Document sanitizers can trigger warnings. --- gcc/doc/invoke.texi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9f0e546..c0ca765 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. -- cgit v1.1