re PR c/7652 (-Wswitch-break : Warn if a switch case falls through)
authorMarek Polacek <polacek@redhat.com>
Tue, 9 Aug 2016 16:39:28 +0000 (16:39 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 9 Aug 2016 16:39:28 +0000 (16:39 +0000)
PR c/7652
gcc/c-family/
* c-ada-spec.c (dump_generic_ada_node): Add return.
gcc/
* cselib.c (cselib_expand_value_rtx_1): Add return.
* gengtype.c (dbgprint_count_type_at): Likewise.
* hsa-gen.c (gen_hsa_insn_for_internal_fn_call): Likewise.
* reg-stack.c (get_true_reg): Restructure to avoid fallthrough warning.

From-SVN: r239297

gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c
gcc/cselib.c
gcc/gengtype.c
gcc/hsa-gen.c
gcc/reg-stack.c

index 854dea5249abc727592cee117a28f2641d99f0c1..cee39a1c0c4bacdd165445c062619e5778a2627a 100644 (file)
@@ -1,3 +1,11 @@
+2016-08-09  Marek Polacek  <polacek@redhat.com>
+
+       PR c/7652
+       * cselib.c (cselib_expand_value_rtx_1): Add return.
+       * gengtype.c (dbgprint_count_type_at): Likewise.
+       * hsa-gen.c (gen_hsa_insn_for_internal_fn_call): Likewise.
+       * reg-stack.c (get_true_reg): Restructure to avoid fallthrough warning.
+
 2016-08-09  Martin Jambor  <mjambor@suse.cz>
 
         PR ipa/71981
index 4b24dd62a7e18f39e45d9293a933ae36e23a1fc7..a1dbc735c50b41fad81988453dc41a29ab34571c 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-09  Marek Polacek  <polacek@redhat.com>
+
+       PR c/7652
+       * c-ada-spec.c (dump_generic_ada_node): Add return.
+
 2016-08-09  Jason Merrill  <jason@redhat.com>
 
        * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
index e33fdffef0e985080fc132a201303f65ca21bedd..17b86103fec7e65a0002ddd4ed3dea10cd73bc49 100644 (file)
@@ -1862,6 +1862,7 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type, int spc,
     case TREE_BINFO:
       dump_generic_ada_node
        (buffer, BINFO_TYPE (node), type, spc, limited_access, name_only);
+      return 0;
 
     case TREE_VEC:
       pp_string (buffer, "--- unexpected node: TREE_VEC");
index 0c5183cf7307e9dd53d8a0c71c6913a80ee2d647..1277842783bf7bbf473053cd7f32e4a16516a7ba 100644 (file)
@@ -1618,6 +1618,7 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
              else
                return orig;
            }
+       return orig;
       }
 
     CASE_CONST_ANY:
index 5479b8f09abdc848c2ec43de164aa1123a1f51be..05183554b2a3927416e819a40e18beab1cf3364f 100644 (file)
@@ -175,6 +175,7 @@ dbgprint_count_type_at (const char *fil, int lin, const char *msg, type_p t)
        {
        case TYPE_UNDEFINED:
          nb_undefined++;
+         break;
        case TYPE_SCALAR:
          nb_scalar++;
          break;
index 6cf153843636e1b1a595e1262c19e66a780726b5..fa4ef126ac59f54c7d3bcbec14bcfaa90c748bb5 100644 (file)
@@ -5039,6 +5039,7 @@ gen_hsa_insn_for_internal_fn_call (gcall *stmt, hsa_bb *hbb)
     case IFN_FMIN:
     case IFN_FMAX:
       gen_hsa_insns_for_call_of_internal_fn (stmt, hbb);
+      break;
 
     default:
       HSA_SORRY_ATV (gimple_location (stmt),
index c931349f0f4287f6c3f3eb1a68a41dc8ffd5cbb3..907f28de5815d048251405b4844f2ef89c66a27a 100644 (file)
@@ -423,23 +423,25 @@ get_true_reg (rtx *pat)
                                  GET_MODE (subreg));
              return pat;
            }
+         pat = &XEXP (*pat, 0);
+         break;
        }
       case FLOAT:
       case FIX:
       case FLOAT_EXTEND:
-       pat = & XEXP (*pat, 0);
+       pat = &XEXP (*pat, 0);
        break;
 
       case UNSPEC:
        if (XINT (*pat, 1) == UNSPEC_TRUNC_NOOP
            || XINT (*pat, 1) == UNSPEC_FILD_ATOMIC)
-         pat = & XVECEXP (*pat, 0, 0);
+         pat = &XVECEXP (*pat, 0, 0);
        return pat;
 
       case FLOAT_TRUNCATE:
        if (!flag_unsafe_math_optimizations)
          return pat;
-       pat = & XEXP (*pat, 0);
+       pat = &XEXP (*pat, 0);
        break;
 
       default: