From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 2EB623857C43 for ; Tue, 18 Jan 2022 22:00:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2EB623857C43 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 2BTDsrKzLTjC3P4dPjoFPnaV68ZKHL97FiquQ1cHm4xTF5yO0psI/egFzet9W9EJtWYG41k4fq msFRgPDdkxuo1B4lmQt5ZccVJ9UYk/cNJ0sEdrAodeIGPdXvTeczmcagNfqvncgOwGfanCcjXj C0grDHEz/Ps3KiJHla/fxieP5OJZb+etd38X0QUW4MGG/PzeUXAyu+Kv3w2+ywl5hoHCGOVWds MPg69rmsdJk1HNrOMY8hrpfOL4IuS4BPsTlwvifYIKoEp6xH6NQyu++1bprCzuo93CVPo8Rr5w f+txS3WYOFWp2UAMCQXXPF8X X-IronPort-AV: E=Sophos;i="5.88,298,1635235200"; d="scan'208";a="73457647" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 18 Jan 2022 14:00:44 -0800 IronPort-SDR: S+2OlxA1IcRDlNNmb2UY51iWh/libIDPXs82z6hIAfpeEbMJKZ76TOFRXzsVzxUaqO7q69QZb/ ZLpKSWBfJh7DMfZuC2nXuLDFTQjxtTvmWht8rLxBOyaZ0l1o6BKJIC+6NLx4wAdQtlcJqcFJsn mOKumSuEVsix9J0yqv5sUNII2GLRz17Jwnln6eYM0fBkEOcCyCwECi9Z5HZVTVBeX4rsVK4oDc dEdTWaHshcveLwd/a0himwZjeL4rQsdVyLSOo5laj5OIONqnuBc8mgZ2TmZywkrTWC125CSiny Hgg= Date: Tue, 18 Jan 2022 22:00:38 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: =?ISO-8859-15?Q?Martin_Li=A8ka?= CC: Subject: Re: [PATCH] riscv: fix -Wformat-diag errors. In-Reply-To: <3f0a77b3-734b-8d37-29bd-5ba7e7b086a8@suse.cz> Message-ID: References: <3f0a77b3-734b-8d37-29bd-5ba7e7b086a8@suse.cz> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3115.4 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 18 Jan 2022 22:00:47 -0000 On Tue, 18 Jan 2022, Martin Liška wrote: > @@ -3309,8 +3309,8 @@ riscv_handle_type_attribute (tree *node > ATTRIBUTE_UNUSED, tree name, tree args, > && strcmp (string, "machine")) > { > warning (OPT_Wattributes, > - "argument to %qE attribute is not \"user\", > \"supervisor\", or \"machine\"", > - name); > + "argument to %qE attribute is not %, > %, " > + "or %", name); > *no_add_attrs = true; My reading is that the attribute arguments here are string constants, not identifiers - that is, the ASCII double quotes are correct in the diagnostic output, because those double quotes are part of the literal text that's supposed to appear in the program. (Maybe %<\"user\"%> is the right way of marking it up to indicate that the double quotes are part of the literal program text, not English-level quoting.) -- Joseph S. Myers joseph@codesourcery.com