diff mbox

Fix m68k so it builds with current trunk

Message ID 281badd7-29fa-88a9-aca4-b501c0cf5d7b@redhat.com
State New
Headers show

Commit Message

Jeff Law Oct. 25, 2016, 2:33 p.m. UTC
It's not currently possible to build various crosses with the current 
trunk due to warning issues.  I suspect this is the first of many 
patches to address those issues.

I'm not familiar with the code in question, but based on Maxim's comment 
the gcc_unreachable ought to be safe.  It could possibly even replace 
the entire else clause here, but I choose to avoid that simply because 
it's riskier.

I've confirmed the various m68k-* targets from config-all.mk will build 
after this patch.

Installed on the trunk.

Jeff
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6548386..6bbb32c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@ 
+2016-10-25  Jeff Law  <law@redhat.com>
+
+	* config/m68k/m68k.c (m68k_get_reloc_decoration): Add gcc_unreachable.
+
 2016-10-25  Martin Liska  <mliska@suse.cz>
 
 	PR sanitizer/78106
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index b152ca8..ce56692 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -4550,6 +4550,7 @@  m68k_get_reloc_decoration (enum m68k_reloc reloc)
 		}
 	    }
 	}
+      gcc_unreachable ();
 
     case RELOC_TLSGD:
       return "@TLSGD";