From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 33E803857008; Wed, 26 Oct 2022 11:08:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33E803857008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666782527; bh=dNusA4iC7BcX2BZn8kcRIwdxpSwXc+NGIjf5zS40pNg=; h=From:To:Subject:Date:From; b=ZsERpGlkKI7XqDwXgzTaKDa6EFXQsBa1kc6pohJAUGq4YoAeCIFbnRXZgBZIq7fkX 5QuYd5vF4FjqKG5alo33yisjzwu6204j3iiLv/WCCZmMAGa6jBD9tjI47W8TvZDpKE Pf1sLZFbNflMDxe2aILMPRL7UEpN/2aExYy7MkpY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/PR107298-document-sanitizer-and-warnings)] docs: document sanitizers can trigger warnings X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/PR107298-document-sanitizer-and-warnings X-Git-Oldrev: d80b7744c6ae6f6d8ca1f56982a50d1888b8279f X-Git-Newrev: 844a59731f5f483495f4bcf10d91c3f193956508 Message-Id: <20221026110847.33E803857008@sourceware.org> Date: Wed, 26 Oct 2022 11:08:47 +0000 (GMT) List-Id: https://gcc.gnu.org/g:844a59731f5f483495f4bcf10d91c3f193956508 commit 844a59731f5f483495f4bcf10d91c3f193956508 Author: Martin Liska Date: Wed Oct 26 13:07:57 2022 +0200 docs: document sanitizers can trigger warnings PR sanitizer/107298 gcc/ChangeLog: * doc/invoke.texi: Document sanitizers can trigger warnings. Diff: --- gcc/doc/invoke.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 64f77e8367a..1ffbba16a72 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -16460,6 +16460,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.