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: 84312 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BAC553858C42 for ; Thu, 18 Jan 2024 02:35:11 +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+patchwork=sourceware.org@gcc.gnu.org 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