From patchwork Fri Jun 23 21:08:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan-Benedict Glaw X-Patchwork-Id: 112297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp6041882vqr; Fri, 23 Jun 2023 14:09:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IvyvSnyNj3fqbG99kagLXuIPABAd9K0kj6XMujOznbsGREqJtM1Ime1iaUEGmAwQYcGTy X-Received: by 2002:a2e:9542:0:b0:2ad:a78a:df0d with SMTP id t2-20020a2e9542000000b002ada78adf0dmr13308292ljh.44.1687554570160; Fri, 23 Jun 2023 14:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687554570; cv=none; d=google.com; s=arc-20160816; b=yAGQJUMFSofWbkf8mY6b0gpRpYUHgbd3qhMtJPmr647ggFjleAfZvmoTu2LHUd7VER hH8XMk+07tgAmWeZpuzhqUAG73iUqqZrVSFswuNis70pC41P3dwPlCYKScHcumRIFH1j YNmJyV6z1Vo4bqBwCeh0UBepA4Ov9OWgjpRp9nK+o7APP8FzXQMVpd/xb5Ode3uDpu/p 26oYGPFpd4BSjydWg/lYK5iJK9gSnqfr0GhlZBzDtmFw5QddX3OuSfNflRaXtQ7YJxD7 NciVz3w78R1hlf8T08xvL1+XXHsNoD+ehm7/89UhZ+3EgxIc3EWlhsOYJYqbLnWANV8A K5QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dmarc-filter :delivered-to; bh=cvO6FMW7mJMFehYdRbbq35/vEGidGGneLKOlOHyqexA=; fh=KJbHaXn8uoQzwQtD4rIi1Va6XEDB+no/bhpxpw3w9Ug=; b=MhFOtbAd3MCj0r7F/Y6awq4059zdiC+T0pyvW0mvSaYl39Mb3B7HKGJlS+HU9lFEJr SOQiK2DXTYqDArPQu3jBLswH8kLs3O58NG8ixfq+EXYqisQ5K+lt3L55gne1GpFFcjSI vBN93nHUrSPlQ7e7ob0xI8w6S38I3vgGjZ0QJNdV9Q1IPsMeG8T0IckzE+2JYiPxZZHm dDEuvadYGc2VdqGxzKIZaJ8GFRnellUWRNbBt2JPy69fOaElGDiRzgsSFawR9C0Ci69C IUG8E8LW53GOazV93D/DKIndntA2O5jht7S7M7jQ6qLSBmtTBMrrSEe6WRt3gioJ3vGI kaKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id h15-20020a170906590f00b00987044cfb80si83159ejq.459.2023.06.23.14.09.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 14:09:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 E6C7C385735D for ; Fri, 23 Jun 2023 21:09:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lug-owl.de (lug-owl.de [188.68.32.151]) by sourceware.org (Postfix) with ESMTPS id B10D53858C2F for ; Fri, 23 Jun 2023 21:08:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B10D53858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id 40D7D42081; Fri, 23 Jun 2023 23:08:52 +0200 (CEST) Date: Fri, 23 Jun 2023 23:08:52 +0200 From: Jan-Benedict Glaw To: Tom de Vries Cc: gcc-patches@gcc.gnu.org Subject: GCC nvptx: Silence warning? Message-ID: <20230623210851.jnyyc24by7jomr2b@lug-owl.de> MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: Linux chamaeleon 5.14.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_ASCII_DIVIDERS, 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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769529221013251390?= X-GMAIL-MSGID: =?utf-8?q?1769529221013251390?= Hi Tom! Building with newer GCC versions (I'm doing CI builds with -Werror), we might see warnings like this: /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o nvptx.o -MT nvptx.o -MMD -MP -MF ./.deps/nvptx.TPo ../../gcc/gcc/config/nvptx/nvptx.cc ../../gcc/gcc/config/nvptx/nvptx.cc: In function 'void handle_ptx_version_option()': ../../gcc/gcc/config/nvptx/nvptx.cc:325:12: error: unquoted identifier or keyword 'sm_' in format [-Werror=format-diag] 325 | error ("PTX version (%<-mptx%>) needs to be at least %s to support selected" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 326 | " %<-misa%> (sm_%s)", ptx_version_to_string (first), | ~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[1]: *** [Makefile:2456: nvptx.o] Error 1 This is because the '_' triggers a generic heuristic that this is probably something special. As I read the message, the `sm_*` ISA descriptor belongs to `-misa`, so maybe just reposition the quotation marks? gcc/ChangeLog: * config/nvptx/nvptx.cc (handle_ptx_version_option): Reposition quotation marks around option with argument. Ok for trunk? Thanks, Jan-Benedict diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index 49cc6814178..ffe6a438265 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -323,7 +323,7 @@ handle_ptx_version_option (void) if (ptx_version_option < first) error ("PTX version (%<-mptx%>) needs to be at least %s to support selected" - " %<-misa%> (sm_%s)", ptx_version_to_string (first), + " %<-misa sm_%s%>", ptx_version_to_string (first), sm_version_to_string ((enum ptx_isa)ptx_isa_option)); }