public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector
@ 2023-06-20  9:45 Lehua Ding
  2023-06-20  9:54 ` juzhe.zhong
  2023-06-20 10:47 ` Robin Dapp
  0 siblings, 2 replies; 10+ messages in thread
From: Lehua Ding @ 2023-06-20  9:45 UTC (permalink / raw)
  To: gcc-patches
  Cc: juzhe.zhong, rdapp.gcc, kito.cheng, palmer, jeffreyalaw, pan2.li

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 branch.

---
 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 6eb63a9d4de7..9558e28de3fc 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;
-- 
2.36.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-20 15:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20  9:45 [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector Lehua Ding
2023-06-20  9:54 ` juzhe.zhong
2023-06-20 10:47 ` Robin Dapp
2023-06-20 10:51   ` juzhe.zhong
2023-06-20 10:56     ` Robin Dapp
2023-06-20 13:11       ` Jeff Law
2023-06-20 13:22         ` Lehua Ding
2023-06-20 14:36         ` Mark Wielaard
2023-06-20 15:28           ` =?gb18030?B?TGVodWEgRGluZw==?=
2023-06-20 13:05     ` Robin Dapp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).