public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Li Xu <xuli1@eswincomputing.com>
To: gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, palmer@dabbelt.com, juzhe.zhong@rivai.ai,
	xuli <xuli1@eswincomputing.com>
Subject: [PATCH v3] RISC-V: Elimilate warning in class vcreate
Date: Tue, 12 Sep 2023 06:20:13 +0000	[thread overview]
Message-ID: <20230912062013.9221-1-xuli1@eswincomputing.com> (raw)

From: xuli <xuli1@eswincomputing.com>

The following is the content of class vcreate:
class vcreate : public function_base
{
public:
  gimple *fold (gimple_folder &f) const override
  {
    ....
  }

  rtx expand (function_expander &e) const override
  {
    return NULL_RTX;
  }
};

The warning caused is:
./riscv-gcc/gcc/config/riscv/riscv-vector-builtins-bases.cc:1719:34:
  warning: unused parameter 'e' [-Wunused-parameter]
  rtx expand (function_expander &e) const override
                                 ^

gcc/ChangeLog:

        * config/riscv/riscv-vector-builtins-bases.cc: remove unused parameter e and replace NULL_RTX with gcc_unreachable.
---
 gcc/config/riscv/riscv-vector-builtins-bases.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/riscv/riscv-vector-builtins-bases.cc b/gcc/config/riscv/riscv-vector-builtins-bases.cc
index be3df2c1ea2..ee218a03017 100644
--- a/gcc/config/riscv/riscv-vector-builtins-bases.cc
+++ b/gcc/config/riscv/riscv-vector-builtins-bases.cc
@@ -1856,9 +1856,9 @@ public:
     return clobber;
   }
 
-  rtx expand (function_expander &e) const override
+  rtx expand (function_expander &) const override
   {
-    return NULL_RTX;
+    gcc_unreachable ();
   }
 };
 
-- 
2.17.1


             reply	other threads:[~2023-09-12  6:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12  6:20 Li Xu [this message]
     [not found] ` <6F0A3219436CFE10+A8D0BFA5-258E-4B8A-8AF2-A076A1966EA6@rivai.ai>
2023-09-12  6:54   ` Li Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230912062013.9221-1-xuli1@eswincomputing.com \
    --to=xuli1@eswincomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).