From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 8705E385741D for ; Tue, 5 Apr 2022 16:33:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8705E385741D Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 365BC23A for ; Tue, 5 Apr 2022 09:33:34 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D47D53F718 for ; Tue, 5 Apr 2022 09:33:33 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [pushed] aarch64: Use error_n for plural text [PR104897] Date: Tue, 05 Apr 2022 17:33:32 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: , X-List-Received-Date: Tue, 05 Apr 2022 16:33:36 -0000 Use error_n rather than error_at for =E2=80=9C%d vectors=E2=80=9D, so that translators can pick different translations based on the number (2 vs more than 2, etc.) Tested on aarch64-linux-gnu & pushed. Richard gcc/ PR target/104897 * config/aarch64/aarch64-sve-builtins.cc (function_resolver::infer_vector_or_tuple_type): Use error_n for "%d vectors" messages. --- gcc/config/aarch64/aarch64-sve-builtins.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch6= 4/aarch64-sve-builtins.cc index 3381726027d..5d1348afa88 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -1352,13 +1352,17 @@ function_resolver::infer_vector_or_tuple_type (unsi= gned int argno, " expects a single SVE vector rather than a tuple", actual, argno + 1, fndecl); else if (size_i =3D=3D 0 && type_i !=3D VECTOR_TYPE_svbool_t) - error_at (location, "passing single vector %qT to argument %d" - " of %qE, which expects a tuple of %d vectors", - actual, argno + 1, fndecl, num_vectors); + /* num_vectors is always !=3D 1, so the singular isn't needed. */ + error_n (location, num_vectors, "%qT%d%qE%d", + "passing single vector %qT to argument %d" + " of %qE, which expects a tuple of %d vectors", + actual, argno + 1, fndecl, num_vectors); else - error_at (location, "passing %qT to argument %d of %qE, which" - " expects a tuple of %d vectors", actual, argno + 1, - fndecl, num_vectors); + /* num_vectors is always !=3D 1, so the singular isn't needed. */ + error_n (location, num_vectors, "%qT%d%qE%d", + "passing %qT to argument %d of %qE, which" + " expects a tuple of %d vectors", actual, argno + 1, + fndecl, num_vectors); return NUM_TYPE_SUFFIXES; } } --=20 2.25.1