This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Minor H8 warning bugfix


I've been seeing the "... reaches end of non-void function ..." warning
during my h8 test builds.  I wanted to make sure it wasn't a real issue
and it isn't.  Having done the RCA, the fix is trivial, so we might as
well go ahead and fix it :-)

This just adds a suitable gcc_unreachable to the problematic pattern.

Committing to the trunk momentarily.

Jeff
commit 065ec66a719f19bb9fffd951bd2d433fc33e18b7
Author: Jeff Law <law@redhat.com>
Date:   Mon Dec 3 10:09:57 2018 -0700

            * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
            warnings quiet.

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index be0aab2c876..36906e314b7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
 2018-12-03  Jeff Law  <law@redhat.com>
 
+	* config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
+	warnings quiet.
+
 	* config/h8300/h8300.md (low byte masking peepholes): Only accept
 	nonimmediate_operand for the to-be-masked operand.
 
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index 9e8f7159846..84b2e4f2bf9 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -1629,6 +1629,7 @@
       return <CODE> == IOR ? "bset\\t%V2,%R0" : "bnot\\t%V2,%R0"; 
     else if (which_alternative == 1)
       return <CODE> == IOR ? "or\\t%X2,%X0" : "xor\\t%X2,%X0";
+    gcc_unreachable ();
   }
   [(set_attr "length" "8,*")
    (set_attr "length_table" "*,logicb")

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]