From 3f9c071324eff2222249b23a7531e447fc17d928 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 26 Oct 2022 13:07:57 +0200
Subject: [PATCH] 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(+)

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