]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Elimilate warning in class vcreate
authorxuli <xuli1@eswincomputing.com>
Tue, 12 Sep 2023 05:45:24 +0000 (05:45 +0000)
committerxuli <xuli1@eswincomputing.com>
Tue, 12 Sep 2023 06:52:48 +0000 (06:52 +0000)
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

index be3df2c1ea2518bd3a31f8b5e4fee87797b10136..ee218a030177b050ffd876c2bff756523b259af6 100644 (file)
@@ -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 ();
   }
 };