From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id A33A838582A1; Fri, 14 Jul 2023 02:48:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A33A838582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689302880; bh=tYcEg5HVnxR4idR7OMw982gOki2EgvyoqwoSDsmoLf0=; h=From:To:Subject:Date:From; b=yde0zE7GzQsWbXoR3tRCXiSGCMEkBcVFzjzcXgdsjm70J1CV8yUAxl/DOv8nOrWQZ wvzhOoZlPVClyU6U19r8ZE+bcwp2TseP74b70QU6KmrCmmb7VfOM++cSb2Cwph/eIy 9EJc929QGwdCjVT/DQPMt0RZUboiQ5OtStSYUu10= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Fix compiler warning of riscv_arg_has_vector X-Act-Checkin: gcc X-Git-Author: Lehua Ding X-Git-Refname: refs/vendors/riscv/heads/gcc-13-with-riscv-opts X-Git-Oldrev: 55fd2437e09eb4e04d774f9c526fddb6b3a37dc7 X-Git-Newrev: 52b9ee9d642d9c1c39479fc9be0d9e6d0bbc62e0 Message-Id: <20230714024800.A33A838582A1@sourceware.org> Date: Fri, 14 Jul 2023 02:48:00 +0000 (GMT) List-Id: https://gcc.gnu.org/g:52b9ee9d642d9c1c39479fc9be0d9e6d0bbc62e0 commit 52b9ee9d642d9c1c39479fc9be0d9e6d0bbc62e0 Author: Lehua Ding Date: Tue Jun 20 17:45:17 2023 +0800 RISC-V: Fix compiler warning of riscv_arg_has_vector Hi, This little patch fixes a compile warning issue that my previous patch introduced, sorry for introducing this issue. Best, Lehua gcc/ChangeLog: * config/riscv/riscv.cc (riscv_arg_has_vector): Add default switch handler. Diff: --- gcc/config/riscv/riscv.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 6eb63a9d4de..9558e28de3f 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -3820,8 +3820,8 @@ riscv_arg_has_vector (const_tree type) switch (TREE_CODE (type)) { case RECORD_TYPE: - /* If it is a record, it is further determined whether its fileds have - vector type. */ + /* If it is a record, it is further determined whether its fields have + vector type. */ for (tree f = TYPE_FIELDS (type); f; f = DECL_CHAIN (f)) if (TREE_CODE (f) == FIELD_DECL) { @@ -3835,6 +3835,8 @@ riscv_arg_has_vector (const_tree type) break; case ARRAY_TYPE: return riscv_arg_has_vector (TREE_TYPE (type)); + default: + break; } return false;