diff mbox

Fall-through warnings in combine.c

Message ID CAE4aFA=Qvji1xb3LfT0vRcgfXA_6n1KXz3kvsgSfm+8HpSTJug@mail.gmail.com
State New
Headers show

Commit Message

Fritz Reese Oct. 31, 2016, 5:16 p.m. UTC
I think this is obvious, the following code in combine.c which intends
to fallthrough some switch cases is not marked with 'gcc_fallthrough'
as it should be, thus producing warnings during compilation.

---
Fritz Reese


2016-10-31  Fritz Reese  <fritzoreese@gmail.com>

        gcc/combine.c (simplify_compare_const): Mark fallthrough cases.
diff mbox

Patch

diff --git a/gcc/combine.c b/gcc/combine.c
index 60a127f..6cbb8cf 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -11414,6 +11414,7 @@  simplify_compare_const (enum rtx_code code, machine_mode mode,
 	  const_op -= 1;
 	  code = LE;
 	  /* ... fall through to LE case below.  */
+	  gcc_fallthrough ();
 	}
       else
 	break;
@@ -11443,6 +11444,7 @@  simplify_compare_const (enum rtx_code code, machine_mode mode,
 	  const_op -= 1;
 	  code = GT;
 	  /* ... fall through to GT below.  */
+	  gcc_fallthrough ();
 	}
       else
 	break;