From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Gerald Pfeifer , Jakub Jelinek Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 List-Id: 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. -- 2.38.0