From patchwork Wed Oct 26 11:09:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 11197 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp195835wru; Wed, 26 Oct 2022 04:09:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6i5qBnDhosh9jHjca5Lbo0qI5zJE6vaRqdGJTTSyJpdhuOwJZhNK35zNhWva2rMyKmCDqA X-Received: by 2002:a17:907:75ed:b0:78d:97ed:2894 with SMTP id jz13-20020a17090775ed00b0078d97ed2894mr35863953ejc.739.1666782592784; Wed, 26 Oct 2022 04:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666782592; cv=none; d=google.com; s=arc-20160816; b=NGJj6sK+pMP0BJpsH//EZpNsZgz6g9y6tWoxS1JbTkjJcFETg63XOAV2h4wMD80PSx eck9atdHDGNjY6/2PMCwXmF+bSGhuuO42ezh6cWUcIF8cTHHNZOHVdT/WDUAdBIlFbSw xnAQk/cV2Am7FLI0gFL8XJyYGYa7IS6H3aiFE5WvOKx2XZ9H8f061tdlrLPPnKsTdsvA CB9NWw11Zlxe5XHFAm7/bCF3OCKqrxd5s6cG6epYSWPbIsqAu8SX/Jaiy2eYUPO/qZOB G+tXLp5RKuxKMm0zFJhrlWTa03f8r7h8vh355F91zqNCCq2lS4KT/Nvj1uJ/gwHGLyFY ++pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:to:subject:from:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=y8iUWHK2QLar54Vu0YsS5JBh9GON+m2CjLswzy/XyCA=; b=oEZaufIyXMbBzWxMIOBq6GRjmdwQQE4xGrwZDFf3XD45mCm5XW+XaEbfe0hLMWWqv2 AgxcEvXGBmIk0x0+YC/i6E6Yfe8JpF7ZF3LEix4VDWUB5FFksRUR/spDmzjddPD6XXHZ xgpMS58MIVAPDoUe7dRssLQwI3AnH5SiaW7SeI18Hc/RL0a+cyzSOxFEfsDyP4wMaY3w pO5PzF/lAjOBLOumPyvHTQwGBreE8/jadLOsv3jBHr3gBKpLhnwcX2D/YFVsJRlCSM5E dGZXBKnTf+l2m11VgKA5ERK9/eFOY52yb/XeKW3rNgsQIGlVgaE2o8/zgtgqfc895oDE G8VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@suse.cz header.s=susede2_rsa header.b=m2y8jQfe; dkim=neutral (no key) header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id q5-20020a1709064cc500b00789d1d367dcsi3015249ejt.281.2022.10.26.04.09.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 04:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@suse.cz header.s=susede2_rsa header.b=m2y8jQfe; dkim=neutral (no key) header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 89229385D0D4 for ; Wed, 26 Oct 2022 11:09:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 2874A385801F for ; Wed, 26 Oct 2022 11:09:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2874A385801F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E23541FD9C; Wed, 26 Oct 2022 11:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1666782558; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8iUWHK2QLar54Vu0YsS5JBh9GON+m2CjLswzy/XyCA=; b=m2y8jQfeoaJMh2g2Zc0p8Lkm7ThmI9w5j0wGD65kENg7NMleUxmM0Jmd5BofeWtixfxPu7 jzGfdir1EDKBc0nXTGlDVg8JRmoC0a+OLWtw813kiKNjgAlQYE+eUmTn6Xus45PqYkKQ2t 5yxhLCzLAzfXRw7L1qhkVWOKo7W050E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1666782558; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8iUWHK2QLar54Vu0YsS5JBh9GON+m2CjLswzy/XyCA=; b=cK7c/PfocZmsD30NeQEyLIEnKCU0U6KqSr/AN4ay9vqp6R9svdrqYOJeKmnSGvCWXsWDxW 0SSYGqxwW+IbxEDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CB2FD13A6E; Wed, 26 Oct 2022 11:09:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Bd9LMF4VWWO4FwAAMHmgww (envelope-from ); Wed, 26 Oct 2022 11:09:18 +0000 Message-ID: <9321d38e-a185-5505-62a5-574d64446798@suse.cz> Date: Wed, 26 Oct 2022 13:09:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] docs: document sanitizers can trigger warnings To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747748223855093312?= X-GMAIL-MSGID: =?utf-8?q?1747748223855093312?= 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 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.