From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id BC7F8385829F for ; Wed, 27 Jul 2022 23:10:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC7F8385829F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,196,1654588800"; d="scan'208";a="80430307" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 27 Jul 2022 15:10:00 -0800 IronPort-SDR: huW7l/AxYbwhDQo2Qx7E0/ZmBBitx/MpyMuCpL9bNCF+3lBHFP5UNVq2HEMtP1ou//Styn3R06 RQ3lODqU7nHIFnC8topH/25fjch5SXMv6z5P4QZuqb51VsdZdZkX6p2AKHq04uCEWVCPcTMZly HxzEH27FfUZWVTfK1ao8A1f+ZGbi80tTCrEFNpWybGAWXmQsdG9ou6idyzeou+3rDTPb6IJYXH rUEFbetPMMwNuCgbISpkpyLief7+J9o5tPwEuRqQyWpfb9FYTOKT/fZfLO2Kj4WZijiPo8mbsB g6I= Date: Wed, 27 Jul 2022 23:09:52 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Tom Honermann CC: Subject: Re: [PATCH 1/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics. In-Reply-To: <20220724043902.1777378-2-tom@honermann.net> Message-ID: References: <20220724043902.1777378-1-tom@honermann.net> <20220724043902.1777378-2-tom@honermann.net> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3112.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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: , X-List-Received-Date: Wed, 27 Jul 2022 23:10:03 -0000 On Sun, 24 Jul 2022, Tom Honermann via Gcc-patches wrote: > Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" > (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, > require that the target diagnostic option be enabled for the preprocessor > (see c_option_is_from_cpp_diagnostics). This change modifies the > -Wc++20-compat option definition to register it as a preprocessor option > so that its associated diagnostics can be suppressed. The changes also There are lots of C++ warning options, all of which should support pragma suppression regardless of whether they are relevant to the preprocessor or not. Do they all need this kind of handling, or is it only -Wc++20-compat that has some kind of problem? -- Joseph S. Myers joseph@codesourcery.com