From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id DB971385780A; Fri, 28 Oct 2022 07:16:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB971385780A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666941410; bh=TGis+dMC2iHMJZXIIS3Keub3/vgPjW/0Y4JWLpzp2mc=; h=From:To:Subject:Date:From; b=I9mX9za8bB7vyRgyRGDi9q78XiyrhwleVBjlFl73VqyspamFEGwp+CK6GgCE8t18/ lOsFhUXV6VmmBfRrQdarW8KQsq28OLB9ZCZVQvj2ttLOEeYvCbup9V5wydTcv8WWlr dZDd/DvwXNov3XL/dZt2klG5xJr4RAvDAZhUsNbQ= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3539] docs: document sanitizers can trigger warnings X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: bd891730b26a6854d9b8f341bd43110085752007 X-Git-Newrev: 3f9c071324eff2222249b23a7531e447fc17d928 Message-Id: <20221028071649.DB971385780A@sourceware.org> Date: Fri, 28 Oct 2022 07:16:48 +0000 (GMT) List-Id: https://gcc.gnu.org/g:3f9c071324eff2222249b23a7531e447fc17d928 commit r13-3539-g3f9c071324eff2222249b23a7531e447fc17d928 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 9f0e5460861..c0ca76544e8 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.