From patchwork Tue Jan 18 16:23:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1581406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=Lw7hbgXr; dkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=8trzEqnn; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JdYzB49FRz9sRR for ; Wed, 19 Jan 2022 03:25:26 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 591B03857C79 for ; Tue, 18 Jan 2022 16:25:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 9DF5C385781A for ; Tue, 18 Jan 2022 16:23:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DF5C385781A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DA4641F3BB for ; Tue, 18 Jan 2022 16:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1642522982; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mvVkuxsUGe0Grud2f53YCOCetXn1zLNkFaLxDtQiFzM=; b=Lw7hbgXrExDXelZK6HWk84MqD8uTGaiS6BCsloMjBw6wttFj7RLw3VyiOSAfSDR/N4LYg8 X/OtQvia2+rjH28X3l+IQJQMNFaP88HX7wMHW5PQp/OmZHXkyjA1Fwjxzwe9ujFsCRWCTu eWPhVgQeEU5w8F7LS+Q/zD3E+grMV+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1642522982; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mvVkuxsUGe0Grud2f53YCOCetXn1zLNkFaLxDtQiFzM=; b=8trzEqnnCrJ3iL42VOEfSZn49Vr5M1h6BGEUlvGMW/DVrVmvcNLX/CmJEqlSDG0YHWVOJG PEmJ2ea0/0yV5qDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CADC413DCD for ; Tue, 18 Jan 2022 16:23:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id A8aKMGbp5mFWAQAAMHmgww (envelope-from ) for ; Tue, 18 Jan 2022 16:23:02 +0000 Message-ID: Date: Tue, 18 Jan 2022 17:23:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] nds32: fix -Wformat-diag warning. To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * config/nds32/nds32-intrinsic.cc (nds32_expand_builtin_impl): Fix warnings. * config/nds32/nds32-intrinsic.md: Likewise. * config/nds32/nds32-isr.cc (nds32_check_isr_attrs_conflict): Likewise. * config/nds32/nds32.cc (nds32_print_operand): Likewise. (nds32_insert_attributes): Likewise. --- gcc/config/nds32/nds32-intrinsic.cc | 6 +++--- gcc/config/nds32/nds32-intrinsic.md | 28 ++++++++++++++-------------- gcc/config/nds32/nds32-isr.cc | 2 +- gcc/config/nds32/nds32.cc | 14 +++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/gcc/config/nds32/nds32-intrinsic.cc b/gcc/config/nds32/nds32-intrinsic.cc index 3c297cfeece..2f2cd7c791e 100644 --- a/gcc/config/nds32/nds32-intrinsic.cc +++ b/gcc/config/nds32/nds32-intrinsic.cc @@ -1013,7 +1013,7 @@ nds32_expand_builtin_impl (tree exp, /* Both v3s and v3f toolchains define TARGET_FPU_SINGLE. */ if (!TARGET_FPU_SINGLE) { - error ("this builtin function is only available " + error ("this built-in function is only available " "on the v3s or v3f toolchain"); return NULL_RTX; } @@ -1025,7 +1025,7 @@ nds32_expand_builtin_impl (tree exp, /* Only v3f toolchain defines TARGET_FPU_DOUBLE. */ if (!TARGET_FPU_DOUBLE) { - error ("this builtin function is only available " + error ("this built-in function is only available " "on the v3f toolchain"); return NULL_RTX; } @@ -1040,7 +1040,7 @@ nds32_expand_builtin_impl (tree exp, case NDS32_BUILTIN_SBUP: if (TARGET_ISA_V3M) { - error ("this builtin function not support " + error ("this built-in function not support " "on the v3m toolchain"); return NULL_RTX; } diff --git a/gcc/config/nds32/nds32-intrinsic.md b/gcc/config/nds32/nds32-intrinsic.md index 45b10f0665d..d7229cdbaa9 100644 --- a/gcc/config/nds32/nds32-intrinsic.md +++ b/gcc/config/nds32/nds32-intrinsic.md @@ -301,8 +301,8 @@ (define_expand "unspec_clr_pending_hwint" offset = 32; } else - error ("__nds32__clr_pending_hwint not support NDS32_INT_SWI," - " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("%<__nds32__clr_pending_hwint%> not support %," + " %, %, %"); /* $INT_PEND type is write one clear. */ clr_hwint = GEN_INT (1 << (INTVAL (operands[0]) - offset)); @@ -359,8 +359,8 @@ (define_expand "unspec_get_pending_int" operands[2] = GEN_INT (31 - (INTVAL (operands[1]) - 32)); } else - error ("get_pending_int not support NDS32_INT_ALZ," - " NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("% not support %," + " %, %"); /* mfsr op0, sytem_reg */ if (system_reg != NULL_RTX) @@ -417,8 +417,8 @@ (define_expand "unspec_set_int_priority" offset = 48; } else - error ("set_int_priority not support NDS32_INT_SWI," - " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("i% not support %," + " %, %, %"); mask = GEN_INT (~(3 << 2 * (INTVAL (operands[0]) - offset))); priority = GEN_INT ((int) (INTVAL (operands[1]) @@ -477,8 +477,8 @@ (define_expand "unspec_get_int_priority" offset = 48; } else - error ("set_int_priority not support NDS32_INT_SWI," - " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("% not support %," + " %, %, %"); priority = GEN_INT (31 - 2 * (INTVAL (operands[1]) - offset)); @@ -514,8 +514,8 @@ (define_expand "unspec_set_trig_level" offset = 32; } else - error ("__nds32__set_trig_type_level not support NDS32_INT_SWI," - " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("%<__nds32__set_trig_type_level%> not support %," + " %, %, %"); if (system_reg != NULL_RTX) { @@ -551,8 +551,8 @@ (define_expand "unspec_set_trig_edge" offset = 32; } else - error ("__nds32__set_trig_type_edge not support NDS32_INT_SWI," - " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("%<__nds32__set_trig_type_edge%> not support %," + " %, %, %"); if (system_reg != NULL_RTX) { @@ -588,8 +588,8 @@ (define_expand "unspec_get_trig_type" offset = 32; } else - error ("__nds32__get_trig_type not support NDS32_INT_SWI," - " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM"); + error ("%<__nds32__get_trig_type%> not support %," + " %, %, %"); if (system_reg != NULL_RTX) { diff --git a/gcc/config/nds32/nds32-isr.cc b/gcc/config/nds32/nds32-isr.cc index 344fb7057d1..eef2d862bd0 100644 --- a/gcc/config/nds32/nds32-isr.cc +++ b/gcc/config/nds32/nds32-isr.cc @@ -614,7 +614,7 @@ nds32_check_isr_attrs_conflict (tree func_decl, tree func_attrs) partial_save_p = 1; if ((save_all_p + partial_save_p) > 1) - error ("multiple save reg attributes to function %qD", func_decl); + error ("multiple save register attributes to function %qD", func_decl); /* We must check at MOST one attribute to set nested-type. */ if (lookup_attribute ("nested", func_attrs)) diff --git a/gcc/config/nds32/nds32.cc b/gcc/config/nds32/nds32.cc index aab02ff2ae9..71fe9e8bcd6 100644 --- a/gcc/config/nds32/nds32.cc +++ b/gcc/config/nds32/nds32.cc @@ -3476,35 +3476,35 @@ nds32_print_operand (FILE *stream, rtx x, int code) case 'R': /* cctl valck */ /* Note the cctl divide to 5 group and share the same name table. */ if (op_value < 0 || op_value > 4) - error ("CCTL intrinsic function subtype out of range!"); + error ("CCTL intrinsic function subtype out of range"); fprintf (stream, "%s", nds32_cctl_names[op_value]); return; case 'T': /* cctl idxwbinv */ /* Note the cctl divide to 5 group and share the same name table. */ if (op_value < 0 || op_value > 4) - error ("CCTL intrinsic function subtype out of range!"); + error ("CCTL intrinsic function subtype out of range"); fprintf (stream, "%s", nds32_cctl_names[op_value + 4]); return; case 'U': /* cctl vawbinv */ /* Note the cctl divide to 5 group and share the same name table. */ if (op_value < 0 || op_value > 4) - error ("CCTL intrinsic function subtype out of range!"); + error ("CCTL intrinsic function subtype out of range"); fprintf (stream, "%s", nds32_cctl_names[op_value + 8]); return; case 'X': /* cctl idxread */ /* Note the cctl divide to 5 group and share the same name table. */ if (op_value < 0 || op_value > 4) - error ("CCTL intrinsic function subtype out of range!"); + error ("CCTL intrinsic function subtype out of range"); fprintf (stream, "%s", nds32_cctl_names[op_value + 12]); return; case 'W': /* cctl idxwitre */ /* Note the cctl divide to 5 group and share the same name table. */ if (op_value < 0 || op_value > 4) - error ("CCTL intrinsic function subtype out of range!"); + error ("CCTL intrinsic function subtype out of range"); fprintf (stream, "%s", nds32_cctl_names[op_value + 16]); return; @@ -3941,7 +3941,7 @@ nds32_insert_attributes (tree decl, tree *attributes) tree new_attrs = *attributes; if (TARGET_LINUX_ABI) - error("cannot use indirect_call attribute under linux toolchain"); + error ("cannot use % attribute under linux toolchain"); if (lookup_attribute ("noinline", new_attrs) == NULL) new_attrs = tree_cons (get_identifier ("noinline"), NULL, new_attrs); @@ -3949,7 +3949,7 @@ nds32_insert_attributes (tree decl, tree *attributes) new_attrs = tree_cons (get_identifier ("noclone"), NULL, new_attrs); if (!TREE_PUBLIC (decl)) - error ("indirect_call attribute can%'t apply for static function"); + error ("% attribute cannot apply for static function"); *attributes = new_attrs; }