From patchwork Thu Jan 18 02:34:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 188986 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp87563dyb; Wed, 17 Jan 2024 18:35:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGaF1kOOt3TPl4u4L6vzXHJzNvkMQRK+4vpoOFdSbdAMal8omZB1b1INBh7NOk+X0yLJmoM X-Received: by 2002:a05:622a:446:b0:429:ff62:ec94 with SMTP id o6-20020a05622a044600b00429ff62ec94mr167567qtx.109.1705545324728; Wed, 17 Jan 2024 18:35:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705545324; cv=pass; d=google.com; s=arc-20160816; b=lkjO2ySk5jqW+ZL4J2gfbZ0zbSKfx8sMkDg7bEkd6yT9mSYB6Gg6kCaUfI9fgdad7t uMxQhfC/PRf86Q0kc6M0t9gzl8U124VlsTjJWRQknSofsKbUAJEwS6zeMXV8rOeFCYoG KheFiheebBv8WYr4Xj29ajIEsQBoOaBSAaKLr9+IdKZCyibP74RbIL0orPviISTjshax KFZiyuFhByrhtLmBQBsS1FXLiBK2lzstaRfQo8rmCdWM29zWjlFUwboffPdwZN8yR/BM f5V6up4PMrawxr9fCVyLta06lw8NONXAn2yDnkEXd8c4jIdkEMkKX2P0fjW0rLFi0iQK gQuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:ironport-sdr :arc-filter:dmarc-filter:delivered-to; bh=E5AHHZDx91G8DpwktQ+aeyoAzKKiyXtXpR7mpyHvFAA=; fh=gk9A5O7Gbglvz1MjrRQ4hZ2i3c68kYkpOZJg1emXh+g=; b=Ci3Nkct8WZ+N1TFjM2E4pjaxPo+9mVeix85azDIMaXPrqjSrpxj20AEjs9AJbWy+Zn gQ6L68Hk9Qn9irqeP7PGbySvHZYKgLxI5Z0Viv/Tu0HJl1h4IiZSTeDaEpHUi38tD35S KPVFvZeKjTmCm8U+ScAKmHaykOv30wuJHgm9DTvJGoFM3Dw8mCFGYzLyyVlrQFrxPJtX ktFEw7LASwq8IM8TX4jY+9mmjLZ7+XkrT6Ae88i3Ken2EAbU7GUVAvLTDKTGmwh08vfF EcG81VUThUFUVTP89r3PlS60e3sa6HTmqWOtl16f25Plpvci1vZhCo7buq0ZRiKPCTYT UuzA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id n9-20020a05622a040900b0042a09f89531si3494737qtx.161.2024.01.17.18.35.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 18:35:24 -0800 (PST) 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; arc=pass (i=1); 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 7078F3858417 for ; Thu, 18 Jan 2024 02:35:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 7CBE53858D33 for ; Thu, 18 Jan 2024 02:34:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CBE53858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7CBE53858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705545285; cv=none; b=Ogm/psGz39AvPiDo73DKZP5DQG3nhW1+b2w16X0HH7bbenar9jV9gQF+y938T/MbsArDtDEHa4BFGWzZRuBTBve2P8oK3lIKbFcomuobMT6FmH5qwFKXjLSQl4GN3lM5V0r0Pa8ohxOU4JKWapLeuWOuLrWZ8eUbgC+y2UmrLnk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705545285; c=relaxed/simple; bh=fQsYQqTDFMofNivFl8OWlbB0orOz7vQjgYFRolmkGiA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=KPScs66i853lCTeEv9IoU8rAEQItsJYp06OsguGfMs7Fe496Ygei5MPoFTDH/vPIqJFeVvpyx0+XfVPzdNwWbuyEMvAHVKhvyR1xX41C7CMbAgqzTulD47MzpZajIGxNNcWdlbAOYOixtoVSeX8ZK2fgJtacM1+fEviVSeEw8Q8= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: HDKiz7uGS9y603pnI5BYRQ== X-CSE-MsgGUID: S7O50Ht8TrqOqmpnv4TUKw== X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="28283912" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 17 Jan 2024 18:34:39 -0800 IronPort-SDR: Y6E9ZJ/3u3a8WX51k0tTcxWpcqTgvJWeSUxMm2T2NIDUxhVi4uwuiK64wc5LHR0sSAj5KICRZa z6jTSX1IW2DXfLNJ/U69Tju5nZeJ2eogU+SW4cBqCEv2qJRoZGy+F6fN6qROQkftfifcUvcJ7z eVVgm9FAZzwA4LU2ytxzYsY++AuaJ7OmPDDYcQRlBxWcq8sJtY8jQzqOq1USjzpFop1j+8uQaZ ke2K7YXdAzY0Wu4Xty7N6bPRar0d/P9JJhTq+VQk+IYzR4N8ljyaT/qUuQsUa+akpYE7l0JWp2 VlU= From: Sandra Loosemore To: Subject: [COMMITTED] Document negative forms of -Wtsan and -Wxor-used-as-pow [PR110847] Date: Wed, 17 Jan 2024 19:34:24 -0700 Message-ID: <20240118023424.1593073-1-sandra@codesourcery.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-11.mgc.mentorg.com (147.34.90.211) To svr-orw-mbx-13.mgc.mentorg.com (147.34.90.213) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788393894360329162 X-GMAIL-MSGID: 1788393894360329162 These warnings are enabled by default, thus the manual should document the -no form instead of the positive form. gcc/ChangeLog PR middle-end/110847 * doc/invoke.texi (Option Summary): Document negative forms of -Wtsan and -Wxor-used-as-pow. (Warning Options): Likewise. --- gcc/doc/invoke.texi | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a537be66736..4d43dda9839 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -410,7 +410,7 @@ Objective-C and Objective-C++ Dialects}. -Wswitch -Wno-switch-bool -Wswitch-default -Wswitch-enum -Wno-switch-outside-range -Wno-switch-unreachable -Wsync-nand -Wsystem-headers -Wtautological-compare -Wtrampolines -Wtrigraphs --Wtrivial-auto-var-init -Wtsan -Wtype-limits -Wundef +-Wtrivial-auto-var-init -Wno-tsan -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunsuffixed-float-constants -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable @@ -424,7 +424,7 @@ Objective-C and Objective-C++ Dialects}. -Wvector-operation-performance -Wvla -Wvla-larger-than=@var{byte-size} -Wno-vla-larger-than -Wvolatile-register-var -Wwrite-strings --Wxor-used-as-pow +-Wno-xor-used-as-pow -Wzero-length-bounds} @item Static Analyzer Options @@ -9090,14 +9090,13 @@ This warning is enabled by default. @opindex Wtsan @opindex Wno-tsan -@item -Wtsan -Warn about unsupported features in ThreadSanitizer. +@item -Wno-tsan + +Disable warnings about unsupported features in ThreadSanitizer. ThreadSanitizer does not support @code{std::atomic_thread_fence} and can report false positives. -This warning is enabled by default. - @opindex Wtype-limits @opindex Wno-type-limits @item -Wtype-limits @@ -10434,17 +10433,18 @@ and/or writes to register variables. This warning is enabled by @opindex Wxor-used-as-pow @opindex Wno-xor-used-as-pow -@item -Wxor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)} -Warn about uses of @code{^}, the exclusive or operator, where it appears -the user meant exponentiation. Specifically, the warning occurs when the +@item -Wno-xor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)} +Disable warnings about uses of @code{^}, the exclusive or operator, +where it appears the code meant exponentiation. +Specifically, the warning occurs when the left-hand side is the decimal constant 2 or 10 and the right-hand side is also a decimal constant. In C and C++, @code{^} means exclusive or, whereas in some other languages (e.g. TeX and some versions of BASIC) it means exponentiation. -This warning is enabled by default. It can be silenced by converting one -of the operands to hexadecimal. +This warning can be silenced by converting one of the operands to +hexadecimal as well as by compiling with @option{-Wno-xor-used-as-pow}. @opindex Wdisabled-optimization @opindex Wno-disabled-optimization