[ARM] Fix -Wimplicit-fallthrough warnings
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 27 Sep 2016 13:38:55 +0000 (13:38 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 27 Sep 2016 13:38:55 +0000 (13:38 +0000)
* config/arm/arm.c (const_ok_for_op): Use "Fall through" comment form
expected by -Wimplicit-fallthrough.
(thumb1_size_rtx_costs): Likewise.
(thumb2_reorg): Likewise.
(tls_mentioned_p): Add "Fall through" comment.
(thumb2_reorg): Likewise.
* config/arm/arm-builtins.c (arm_expand_neon_args): Use "Fall through"
comment form expected by -Wimplicit-fallthrough.

From-SVN: r240537

gcc/ChangeLog
gcc/config/arm/arm-builtins.c
gcc/config/arm/arm.c

index 2fe256cc63caf46c1989ebec4442586c5c93ae03..374a0841b7d3af64606e121d5963dcf3bf168433 100644 (file)
@@ -1,3 +1,14 @@
+2016-09-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * config/arm/arm.c (const_ok_for_op): Use "Fall through" comment form
+       expected by -Wimplicit-fallthrough.
+       (thumb1_size_rtx_costs): Likewise.
+       (thumb2_reorg): Likewise.
+       (tls_mentioned_p): Add "Fall through" comment.
+       (thumb2_reorg): Likewise.
+       * config/arm/arm-builtins.c (arm_expand_neon_args): Use "Fall through"
+       comment form expected by -Wimplicit-fallthrough.
+
 2016-09-27  Martin Liska  <mliska@suse.cz>
 
        PR gcov-profile/46266
index 70bcc07405f1891bce5ab1ed86b299698347f561..4fafefc4050a94ff8da0d214dcdbc046890fe927 100644 (file)
@@ -2153,9 +2153,9 @@ arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode,
                  enum machine_mode vmode = mode[argc - 1];
                  neon_lane_bounds (op[argc], 0, GET_MODE_NUNITS (vmode), exp);
                }
-             /* Fall through - if the lane index isn't a constant then
-                the next case will error.  */
-
+             /* If the lane index isn't a constant then the next
+                case will error.  */
+             /* Fall through.  */
            case NEON_ARG_CONSTANT:
 constant_arg:
              if (!(*insn_data[icode].operand[opno].predicate)
index feb54cbc64a594e3cbb681c49955df6e521ee4eb..705fa0078f0d9e9931c9edb61f04cd5ab9228cf4 100644 (file)
@@ -4001,8 +4001,7 @@ const_ok_for_op (HOST_WIDE_INT i, enum rtx_code code)
          && ((i & 0xfffff000) == 0
              || ((-i) & 0xfffff000) == 0))
        return 1;
-      /* else fall through.  */
-
+      /* Fall through.  */
     case COMPARE:
     case EQ:
     case NE:
@@ -9129,7 +9128,7 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer)
          || (GET_CODE (XEXP (x, 1)) == MULT
              && power_of_two_operand (XEXP (XEXP (x, 1), 1), SImode)))
        return COSTS_N_INSNS (2);
-      /* On purpose fall through for normal RTX.  */
+      /* Fall through.  */
     case COMPARE:
     case NEG:
     case NOT:
@@ -13371,6 +13370,7 @@ tls_mentioned_p (rtx x)
       if (XINT (x, 1) == UNSPEC_TLS)
        return 1;
 
+    /* Fall through.  */
     default:
       return 0;
     }
@@ -17568,7 +17568,7 @@ thumb2_reorg (void)
                         test the global flag here.  */
                      if (!optimize_size)
                        break;
-                     /* else fall through.  */
+                     /* Fall through.  */
                    case AND:
                    case IOR:
                    case XOR: