aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog95
-rw-r--r--gcc/alias.c2
-rw-r--r--gcc/c-family/ChangeLog10
-rw-r--r--gcc/c-family/c-common.c2
-rw-r--r--gcc/c-family/c-opts.c2
-rw-r--r--gcc/c-family/c-pragma.c1
-rw-r--r--gcc/c-family/c-pretty-print.c2
-rw-r--r--gcc/c-family/cilk.c1
-rw-r--r--gcc/c/ChangeLog8
-rw-r--r--gcc/c/c-parser.c2
-rw-r--r--gcc/c/c-typeck.c6
-rw-r--r--gcc/cfgexpand.c2
-rw-r--r--gcc/combine.c16
-rw-r--r--gcc/config/aarch64/aarch64-builtins.c1
-rw-r--r--gcc/config/aarch64/predicates.md2
-rw-r--r--gcc/config/i386/i386.c17
-rw-r--r--gcc/config/rs6000/rs6000.c3
-rw-r--r--gcc/config/rs6000/rs6000.md3
-rw-r--r--gcc/cp/ChangeLog35
-rw-r--r--gcc/cp/call.c9
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/constexpr.c7
-rw-r--r--gcc/cp/cp-gimplify.c5
-rw-r--r--gcc/cp/cvt.c2
-rw-r--r--gcc/cp/cxx-pretty-print.c17
-rw-r--r--gcc/cp/error.c4
-rw-r--r--gcc/cp/mangle.c2
-rw-r--r--gcc/cp/method.c1
-rw-r--r--gcc/cp/name-lookup.c1
-rw-r--r--gcc/cp/parser.c4
-rw-r--r--gcc/cp/pt.c3
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/cp/tree.c2
-rw-r--r--gcc/dbxout.c2
-rw-r--r--gcc/df-scan.c2
-rw-r--r--gcc/dojump.c3
-rw-r--r--gcc/dwarf2out.c7
-rw-r--r--gcc/expmed.c2
-rw-r--r--gcc/expr.c11
-rw-r--r--gcc/fold-const.c13
-rw-r--r--gcc/fortran/ChangeLog12
-rw-r--r--gcc/fortran/decl.c1
-rw-r--r--gcc/fortran/primary.c3
-rw-r--r--gcc/fortran/resolve.c9
-rw-r--r--gcc/fortran/trans-array.c1
-rw-r--r--gcc/fortran/trans-intrinsic.c2
-rw-r--r--gcc/gcov-tool.c2
-rw-r--r--gcc/genattrtab.c2
-rw-r--r--gcc/genconfig.c1
-rw-r--r--gcc/genpreds.c8
-rw-r--r--gcc/gensupport.c2
-rw-r--r--gcc/gimple-pretty-print.c2
-rw-r--r--gcc/gimplify.c5
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c2
-rw-r--r--gcc/hsa-gen.c2
-rw-r--r--gcc/ipa-icf.c2
-rw-r--r--gcc/ira.c1
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/expr.c2
-rw-r--r--gcc/java/jcf-io.c2
-rw-r--r--gcc/java/typeck.c2
-rw-r--r--gcc/lra-eliminations.c4
-rw-r--r--gcc/lto-streamer-out.c1
-rw-r--r--gcc/objc/ChangeLog5
-rw-r--r--gcc/objc/objc-encoding.c1
-rw-r--r--gcc/opts.c3
-rw-r--r--gcc/read-rtl.c1
-rw-r--r--gcc/real.c1
-rw-r--r--gcc/recog.c1
-rw-r--r--gcc/reginfo.c2
-rw-r--r--gcc/reload1.c10
-rw-r--r--gcc/rtlanal.c3
-rw-r--r--gcc/sched-rgn.c1
-rw-r--r--gcc/simplify-rtx.c2
-rw-r--r--gcc/stor-layout.c2
-rw-r--r--gcc/toplev.c4
-rw-r--r--gcc/tree-cfg.c2
-rw-r--r--gcc/tree-chrec.c10
-rw-r--r--gcc/tree-data-ref.c2
-rw-r--r--gcc/tree.c8
-rw-r--r--gcc/var-tracking.c4
-rw-r--r--gcc/varasm.c1
-rw-r--r--libcpp/ChangeLog10
-rw-r--r--libcpp/lex.c4
-rw-r--r--libcpp/macro.c1
-rw-r--r--libcpp/pch.c4
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/cp-demangle.c2
88 files changed, 387 insertions, 88 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4f45c06f8b4..165e183b68c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,101 @@
2016-08-12 Marek Polacek <polacek@redhat.com>
PR c/7652
+ * alias.c (find_base_value): Adjust fall through comment.
+ * cfgexpand.c (expand_debug_expr): Likewise.
+ * combine.c (find_split_point): Likewise.
+ (expand_compound_operation): Likewise. Add FALLTHRU.
+ (make_compound_operation): Adjust fall through comment.
+ (canon_reg_for_combine): Add FALLTHRU.
+ (force_to_mode): Adjust fall through comment.
+ (simplify_shift_const_1): Likewise.
+ (simplify_comparison): Likewise.
+ * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add
+ FALLTHRU.
+ * config/aarch64/predicates.md: Likewise.
+ * config/i386/i386.c (function_arg_advance_32): Likewise.
+ (ix86_gimplify_va_arg): Likewise.
+ (print_reg): Likewise.
+ (ix86_print_operand): Likewise.
+ (ix86_build_const_vector): Likewise.
+ (ix86_expand_branch): Likewise.
+ (ix86_sched_init_global): Adjust fall through comment.
+ (ix86_expand_args_builtin): Add FALLTHRU.
+ (ix86_expand_builtin): Likewise.
+ (ix86_expand_vector_init_one_var): Likewise.
+ * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise.
+ (rs6000_adjust_cost): Likewise.
+ (insn_must_be_first_in_group): Likewise.
+ * config/rs6000/rs6000.md: Likewise. Adjust fall through comment.
+ * dbxout.c (dbxout_symbol): Adjust fall through comment.
+ * df-scan.c (df_uses_record): Likewise.
+ * dojump.c (do_jump): Add FALLTHRU.
+ * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through
+ comment.
+ (resolve_args_picking_1): Adjust fall through comment.
+ (loc_list_from_tree_1): Likewise.
+ * expmed.c (make_tree): Likewise.
+ * expr.c (expand_expr_real_2): Add FALLTHRU.
+ (expand_expr_real_1): Likewise. Adjust fall through comment.
+ * fold-const.c (const_binop): Adjust fall through comment.
+ (fold_truth_not_expr): Likewise.
+ (fold_cond_expr_with_comparison): Add FALLTHRU.
+ (fold_binary_loc): Likewise.
+ (contains_label_1): Adjust fall through comment.
+ (multiple_of_p): Likewise.
+ * gcov-tool.c (process_args): Add FALLTHRU.
+ * genattrtab.c (check_attr_test): Likewise.
+ (write_test_expr): Likewise.
+ * genconfig.c (walk_insn_part): Likewise.
+ * genpreds.c (validate_exp): Adjust fall through comment.
+ (needs_variable): Likewise.
+ * gensupport.c (get_alternatives_number): Add FALLTHRU.
+ (subst_dup): Likewise.
+ * gimple-pretty-print.c (dump_gimple_assign): Likewise.
+ * gimplify.c (gimplify_addr_expr): Adjust fall through comment.
+ (gimplify_scan_omp_clauses): Add FALLTHRU.
+ (goa_stabilize_expr): Likewise.
+ * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall
+ through comment.
+ * hsa-gen.c (get_address_from_value): Likewise.
+ * ipa-icf.c (sem_function::hash_stmt): Likewise.
+ * ira.c (ira_setup_alts): Add FALLTHRU.
+ * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through
+ comment.
+ * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU.
+ * opts.c (common_handle_option): Likewise.
+ * read-rtl.c (read_rtx_code): Likewise.
+ * real.c (round_for_format): Likewise.
+ * recog.c (asm_operand_ok): Likewise.
+ * reginfo.c (reg_scan_mark_refs): Adjust fall through comment.
+ * reload1.c (set_label_offsets): Likewise.
+ (eliminate_regs_1): Likewise.
+ (reload_reg_reaches_end_p): Likewise.
+ * rtlanal.c (commutative_operand_precedence): Add FALLTHRU.
+ (rtx_cost): Likewise.
+ * sched-rgn.c (is_exception_free): Likewise.
+ * simplify-rtx.c (simplify_rtx): Adjust fall through comment.
+ * stor-layout.c (int_mode_for_mode): Likewise.
+ * toplev.c (print_to_asm_out_file): Likewise.
+ (print_to_stderr): Likewise.
+ * tree-cfg.c (gimple_verify_flow_info): Likewise.
+ * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU.
+ (chrec_fold_multiply): Likewise.
+ (evolution_function_is_invariant_rec_p): Likewise.
+ (for_each_scev_op): Likewise.
+ * tree-data-ref.c (siv_subscript_p): Likewise.
+ (get_references_in_stmt): Likewise.
+ * tree.c (find_placeholder_in_expr): Adjust fall through comment.
+ (substitute_in_expr): Likewise.
+ (type_cache_hasher::equal): Likewise.
+ (walk_type_fields): Likewise.
+ * var-tracking.c (adjust_mems): Add FALLTHRU.
+ (set_dv_changed): Adjust fall through comment.
+ * varasm.c (default_function_section): Add FALLTHRU.
+
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
* tree-complex.c (expand_complex_division): Add missing break.
2016-08-12 Richard Biener <rguenther@suse.de>
diff --git a/gcc/alias.c b/gcc/alias.c
index dd1dfd38920..f4b5a924b33 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1398,7 +1398,7 @@ find_base_value (rtx src)
if (GET_CODE (src) != PLUS && GET_CODE (src) != MINUS)
break;
- /* ... fall through ... */
+ /* fall through */
case PLUS:
case MINUS:
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 13acd93a17c..14db7087321 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,13 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * c-common.c (scalar_to_vector): Adjust fall through comment.
+ * c-opts.c (c_common_handle_option): Likewise.
+ * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
+ * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
+ fall through comment.
+ * cilk.c (extract_free_variables): Add FALLTHRU.
+
2016-08-10 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 7fd84eebc44..51b6ca95f91 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -12709,7 +12709,7 @@ scalar_to_vector (location_t loc, enum tree_code code, tree op0, tree op1,
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
integer_only_op = true;
- /* ... fall through ... */
+ /* fall through */
case VEC_COND_EXPR:
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 0715b2ef200..574718a9a98 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -439,7 +439,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
case OPT_ffreestanding:
value = !value;
- /* Fall through.... */
+ /* Fall through. */
case OPT_fhosted:
flag_hosted = value;
flag_no_builtin = !value;
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 277bc560318..1a9a9f3f3eb 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -214,6 +214,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
align = maximum_field_alignment;
break;
}
+ /* FALLTHRU */
default:
GCC_BAD2 ("alignment must be a small power of two, not %d", align);
}
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c
index 704d21daaaa..374bd1a3484 100644
--- a/gcc/c-family/c-pretty-print.c
+++ b/gcc/c-family/c-pretty-print.c
@@ -1662,7 +1662,7 @@ c_pretty_printer::postfix_expression (tree e)
id_expression (TREE_OPERAND (e, 0));
break;
}
- /* else fall through. */
+ /* fall through. */
default:
primary_expression (e);
diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index 39781c483a0..8042f216e0a 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -1097,6 +1097,7 @@ extract_free_variables (tree t, struct wrapper_data *wd,
case RESULT_DECL:
if (wd->type != CILK_BLOCK_SPAWN)
TREE_ADDRESSABLE (t) = 1;
+ /* FALLTHRU */
case VAR_DECL:
case PARM_DECL:
if (!is_global_var (t))
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 94f78438043..62701f0e493 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,11 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
+ (c_parser_postfix_expression): Likewise.
+ * c-typeck.c (build_unary_op): Adjust fall through comment.
+ (c_mark_addressable): Likewise.
+
2016-08-11 Jakub Jelinek <jakub@redhat.com>
PR c/72816
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index ec74e0b3ead..c050f644566 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -1557,6 +1557,7 @@ c_parser_external_declaration (c_parser *parser)
}
/* Else fall through, and yield a syntax error trying to parse
as a declaration or function definition. */
+ /* FALLTHRU */
default:
decl_or_fndef:
/* A declaration or a function definition (or, in Objective-C,
@@ -8174,6 +8175,7 @@ c_parser_postfix_expression (c_parser *parser)
break;
}
/* Else fall through to report error. */
+ /* FALLTHRU */
default:
c_parser_error (parser, "expected expression");
expr.set_error ();
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 33c06d40417..8456a0c0b1e 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -4493,7 +4493,7 @@ build_unary_op (location_t location,
return error_mark_node;
}
- /* ... fall through ... */
+ /* fall through */
case ARRAY_REF:
if (TYPE_REVERSE_STORAGE_ORDER (TREE_TYPE (TREE_OPERAND (arg, 0))))
@@ -4695,10 +4695,10 @@ c_mark_addressable (tree exp)
return false;
}
- /* drops in */
+ /* FALLTHRU */
case FUNCTION_DECL:
TREE_ADDRESSABLE (x) = 1;
- /* drops out */
+ /* FALLTHRU */
default:
return true;
}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 417f0dc16e3..130a16b1d7d 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -4239,7 +4239,7 @@ expand_debug_expr (tree exp)
set_mem_attributes (op0, exp, 0);
return op0;
}
- /* Fall through... */
+ /* Fall through. */
case INTEGER_CST:
case REAL_CST:
diff --git a/gcc/combine.c b/gcc/combine.c
index b687867652f..1b262f94fed 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5135,7 +5135,7 @@ find_split_point (rtx *loc, rtx_insn *insn, bool set_src)
split = find_split_point (&XEXP (x, 2), insn, false);
if (split)
return split;
- /* ... fall through ... */
+ /* fall through */
case RTX_BIN_ARITH:
case RTX_COMM_ARITH:
case RTX_COMPARE:
@@ -5143,7 +5143,7 @@ find_split_point (rtx *loc, rtx_insn *insn, bool set_src)
split = find_split_point (&XEXP (x, 1), insn, false);
if (split)
return split;
- /* ... fall through ... */
+ /* fall through */
case RTX_UNARY:
/* Some machines have (and (shift ...) ...) insns. If X is not
an AND, but XEXP (X, 0) is, use it as our split point. */
@@ -6955,6 +6955,7 @@ expand_compound_operation (rtx x)
{
case ZERO_EXTEND:
unsignedp = 1;
+ /* FALLTHRU */
case SIGN_EXTEND:
/* We can't necessarily use a const_int for a multiword mode;
it depends on implicitly extending the value.
@@ -6997,7 +6998,7 @@ expand_compound_operation (rtx x)
case ZERO_EXTRACT:
unsignedp = 1;
- /* ... fall through ... */
+ /* fall through */
case SIGN_EXTRACT:
/* If the operand is a CLOBBER, just return it. */
@@ -8037,7 +8038,7 @@ make_compound_operation (rtx x, enum rtx_code in_code)
break;
}
- /* ... fall through ... */
+ /* fall through */
case ASHIFTRT:
lhs = XEXP (x, 0);
@@ -8265,6 +8266,7 @@ canon_reg_for_combine (rtx x, rtx reg)
if (op0 != XEXP (x, 0) || op1 != XEXP (x, 1) || op2 != XEXP (x, 2))
return simplify_gen_ternary (GET_CODE (x), GET_MODE (x),
GET_MODE (op0), op0, op1, op2);
+ /* FALLTHRU */
case RTX_OBJ:
if (REG_P (x))
@@ -8531,7 +8533,7 @@ force_to_mode (rtx x, machine_mode mode, unsigned HOST_WIDE_INT mask,
mode, smask, next_select);
}
- /* ... fall through ... */
+ /* fall through */
case MULT:
/* Substituting into the operands of a widening MULT is not likely to
@@ -10404,7 +10406,7 @@ simplify_shift_const_1 (enum rtx_code code, machine_mode result_mode,
continue;
}
- /* ... fall through ... */
+ /* fall through */
case LSHIFTRT:
case ASHIFT:
@@ -11730,7 +11732,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
continue;
}
- /* ... fall through ... */
+ /* fall through */
case SIGN_EXTRACT:
tem = expand_compound_operation (op0);
diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
index 1de325a0fc3..9136910cd32 100644
--- a/gcc/config/aarch64/aarch64-builtins.c
+++ b/gcc/config/aarch64/aarch64-builtins.c
@@ -1017,6 +1017,7 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval,
}
/* Fall through - if the lane index isn't a constant then
the next case will error. */
+ /* FALLTHRU */
case SIMD_ARG_CONSTANT:
constant_arg:
if (!(*insn_data[icode].operand[opc].predicate)
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index 8f2726d4483..ebda6d812e7 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -180,6 +180,7 @@
|| GET_CODE (XEXP (op, 1)) != CONST_INT)
return false;
op = XEXP (op, 0);
+ /* FALLTHRU */
case SYMBOL_REF:
return SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_INITIAL_EXEC;
@@ -201,6 +202,7 @@
|| GET_CODE (XEXP (op, 1)) != CONST_INT)
return false;
op = XEXP (op, 0);
+ /* FALLTHRU */
case SYMBOL_REF:
return SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_EXEC;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d086edea814..62896bfbb1e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9338,6 +9338,7 @@ pass_in_reg:
error_p = 1;
if (cum->float_in_sse < 2)
break;
+ /* FALLTHRU */
case SFmode:
if (cum->float_in_sse == -1)
error_p = 1;
@@ -9605,6 +9606,7 @@ pass_in_reg:
error_p = 1;
if (cum->float_in_sse < 2)
break;
+ /* FALLTHRU */
case SFmode:
if (cum->float_in_sse == -1)
error_p = 1;
@@ -11010,6 +11012,7 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
container = NULL;
break;
}
+ /* FALLTHRU */
default:
container = construct_container (nat_mode, TYPE_MODE (type),
@@ -17318,6 +17321,7 @@ print_reg (rtx x, int code, FILE *file)
case 4:
if (LEGACY_INT_REGNO_P (regno))
putc (msize == 8 && TARGET_64BIT ? 'r' : 'e', file);
+ /* FALLTHRU */
case 16:
case 12:
case 2:
@@ -17727,6 +17731,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("eq_us", file);
break;
}
+ /* FALLTHRU */
case EQ:
fputs ("eq", file);
break;
@@ -17736,6 +17741,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("nge", file);
break;
}
+ /* FALLTHRU */
case LT:
fputs ("lt", file);
break;
@@ -17745,6 +17751,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("ngt", file);
break;
}
+ /* FALLTHRU */
case LE:
fputs ("le", file);
break;
@@ -17757,6 +17764,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("neq_oq", file);
break;
}
+ /* FALLTHRU */
case NE:
fputs ("neq", file);
break;
@@ -17766,6 +17774,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("ge", file);
break;
}
+ /* FALLTHRU */
case UNGE:
fputs ("nlt", file);
break;
@@ -17775,6 +17784,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("gt", file);
break;
}
+ /* FALLTHRU */
case UNGT:
fputs ("nle", file);
break;
@@ -21522,6 +21532,7 @@ ix86_build_const_vector (machine_mode mode, bool vect, rtx value)
case V4DImode:
case V2DImode:
gcc_assert (vect);
+ /* FALLTHRU */
case V16SFmode:
case V8SFmode:
case V4SFmode:
@@ -22507,6 +22518,7 @@ ix86_expand_branch (enum rtx_code code, rtx op0, rtx op1, rtx label)
op0 = force_reg (mode, gen_rtx_XOR (mode, op0, op1));
op1 = const0_rtx;
}
+ /* FALLTHRU */
case TImode:
/* Expand DImode branch into multiple compare+branch. */
{
@@ -29868,7 +29880,7 @@ ix86_sched_init_global (FILE *, int, int)
core2i7_ifetch_block_max_insns = 6;
break;
}
- /* ... Fall through ... */
+ /* Fall through. */
default:
targetm.sched.dfa_post_advance_cycle = NULL;
targetm.sched.first_cycle_multipass_init = NULL;
@@ -40139,6 +40151,7 @@ ix86_expand_args_builtin (const struct builtin_description *d,
error ("the next to last argument must be an 8-bit immediate");
break;
}
+ /* FALLTHRU */
case 1:
error ("the last argument must be an 8-bit immediate");
break;
@@ -42870,6 +42883,7 @@ rdseed_step:
if (!TARGET_SSE)
/* Emit a normal call if SSE isn't available. */
return expand_call (exp, target, ignore);
+ /* FALLTHRU */
default:
return ix86_expand_args_builtin (d, exp, target);
}
@@ -47023,6 +47037,7 @@ ix86_expand_vector_init_one_var (bool mmx_ok, machine_mode mode,
/* Use ix86_expand_vector_set in 64bit mode only. */
if (!TARGET_64BIT)
return false;
+ /* FALLTHRU */
case V4DFmode:
case V8SFmode:
case V8SImode:
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index cfc4e0142fd..756e69df3c5 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -22949,6 +22949,7 @@ rs6000_emit_vector_compare_inner (enum rtx_code code, rtx op0, rtx op1)
case GE:
if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT)
return NULL_RTX;
+ /* FALLTHRU */
case EQ:
case GT:
@@ -30687,6 +30688,7 @@ rs6000_adjust_cost (rtx_insn *insn, int dep_type, rtx_insn *dep_insn, int cost,
}
}
/* Fall through, no cost for output dependency. */
+ /* FALLTHRU */
case REG_DEP_ANTI:
/* Anti dependency; DEP_INSN reads a register that INSN writes some
@@ -31833,6 +31835,7 @@ insn_must_be_first_in_group (rtx_insn *insn)
case PROCESSOR_POWER5:
if (is_cracked_insn (insn))
return true;
+ /* FALLTHRU */
case PROCESSOR_POWER4:
if (is_microcoded_insn (insn))
return true;
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 84cb066b024..df75dc26807 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -8153,6 +8153,7 @@
case 0:
if (TARGET_STRING)
return \"stswi %1,%P0,16\";
+ /* FALLTHRU */
case 1:
return \"#\";
case 2:
@@ -8161,7 +8162,7 @@
if (TARGET_STRING
&& ! reg_overlap_mentioned_p (operands[0], operands[1]))
return \"lswi %0,%P1,16\";
- /* ... fall through ... */
+ /* fall through */
case 3:
case 4:
case 5:
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4049c76bfeb..52965b8cfe0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,38 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * call.c (add_builtin_candidate): Add FALLTHRU.
+ (build_integral_nontype_arg_conv): Adjust fall through comment.
+ (build_new_op_1): Add FALLTHRU.
+ (convert_like_real): Adjust fall through comment.
+ * class.c (fixed_type_or_null): Likewise.
+ * constexpr.c (cxx_eval_constant_expression): Likewise.
+ (potential_constant_expression_1): Likewise. Add FALLTHRU.
+ * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment.
+ (cp_fold): Add FALLTHRU.
+ * cvt.c (build_expr_type_conversion): Adjust fall through comment.
+ * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU.
+ (pp_cxx_qualified_id): Likewise.
+ (cxx_pretty_printer::constant): Adjust fall through comment.
+ (cxx_pretty_printer::primary_expression): Add FALLTHRU.
+ (pp_cxx_pm_expression): Adjust fall through comment.
+ (cxx_pretty_printer::expression): Add FALLTHRU.
+ (cxx_pretty_printer::declaration_specifiers): Reformat code.
+ (pp_cxx_type_specifier_seq): Adjust fall through comment.
+ (pp_cxx_ptr_operator): Likewise. Add FALLTHRU.
+ * error.c (dump_type): Adjust fall through comment.
+ (dump_decl): Likewise.
+ * mangle.c (write_type): Likewise.
+ * method.c (synthesized_method_walk): Add FALLTHRU.
+ * name-lookup.c (arg_assoc_type): Likewise.
+ * parser.c (cp_lexer_print_token): Adjust fall through comment.
+ (cp_parser_primary_expression): Add FALLTHRU.
+ (cp_parser_operator): Likewise.
+ * pt.c (find_parameter_packs_r): Likewise.
+ (tsubst_aggr_type): Adjust fall through comment.
+ * semantics.c (finish_omp_clauses): Add FALLTHRU.
+ * tree.c (lvalue_kind): Likewise.
+
2016-08-12 Alexandre Oliva <aoliva@redhat.com>
PR debug/63240
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 918661ab786..0203cd1c7b2 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -2421,6 +2421,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
case PREDECREMENT_EXPR:
if (TREE_CODE (type1) == BOOLEAN_TYPE)
return;
+ /* FALLTHRU */
case POSTINCREMENT_EXPR:
case PREINCREMENT_EXPR:
if (ARITHMETIC_TYPE_P (type1) || TYPE_PTROB_P (type1))
@@ -2457,6 +2458,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
case UNARY_PLUS_EXPR: /* unary + */
if (TYPE_PTR_P (type1))
break;
+ /* FALLTHRU */
case NEGATE_EXPR:
if (ARITHMETIC_TYPE_P (type1))
break;
@@ -2594,6 +2596,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
case PLUS_EXPR:
if (ARITHMETIC_TYPE_P (type1) && ARITHMETIC_TYPE_P (type2))
break;
+ /* FALLTHRU */
case ARRAY_REF:
if (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (type1) && TYPE_PTROB_P (type2))
{
@@ -2674,6 +2677,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
type2 = ptrdiff_type_node;
break;
}
+ /* FALLTHRU */
case MULT_EXPR:
case TRUNC_DIV_EXPR:
if (ARITHMETIC_TYPE_P (type1) && ARITHMETIC_TYPE_P (type2))
@@ -3966,7 +3970,7 @@ build_integral_nontype_arg_conv (tree type, tree expr, tsubst_flags_t complain)
if (complain & tf_error)
error_at (loc, "conversion from %qT to %qT not considered for "
"non-type template argument", t, type);
- /* and fall through. */
+ /* fall through. */
default:
conv = NULL;
@@ -5493,6 +5497,7 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
case MODIFY_EXPR:
if (code2 != NOP_EXPR)
break;
+ /* FALLTHRU */
case COMPONENT_REF:
case ARRAY_REF:
memonly = true;
@@ -6661,7 +6666,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
if (! MAYBE_CLASS_TYPE_P (totype))
return expr;
- /* Else fall through. */
+ /* Fall through. */
case ck_base:
if (convs->kind == ck_base && !convs->need_temporary_p)
{
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 10286a7404e..3ad1b8910fc 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7413,7 +7413,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp)
*nonnull = 1;
return TREE_TYPE (TREE_TYPE (instance));
}
- /* fall through... */
+ /* fall through. */
case TARGET_EXPR:
case PARM_DECL:
case RESULT_DECL:
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index cb0fdeebb08..5d97a4be4f1 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -3699,7 +3699,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
if (is_capture_proxy (t))
return cxx_eval_constant_expression (ctx, DECL_VALUE_EXPR (t),
lval, non_constant_p, overflow_p);
- /* else fall through. */
+ /* fall through */
case CONST_DECL:
/* We used to not check lval for CONST_DECL, but darwin.c uses
CONST_DECL for aggregate constants. */
@@ -3988,7 +3988,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
overflow_p);
if (r)
break;
- /* else fall through */
+ /* fall through */
case PLUS_EXPR:
case MINUS_EXPR:
@@ -5167,7 +5167,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict,
/* A destructor. */
if (TYPE_P (TREE_OPERAND (t, 0)))
return true;
- /* else fall through. */
+ /* fall through. */
case REALPART_EXPR:
case IMAGPART_EXPR:
@@ -5269,6 +5269,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict,
}
return false;
}
+ /* FALLTHRU */
case INIT_EXPR:
return RECUR (TREE_OPERAND (t, 1), rval);
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index e28c9dfc799..6d514d0e99e 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -659,7 +659,7 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
cp_gimplify_init_expr (expr_p);
if (TREE_CODE (*expr_p) != INIT_EXPR)
return GS_OK;
- /* Otherwise fall through. */
+ /* Fall through. */
case MODIFY_EXPR:
modify_expr_case:
{
@@ -2068,6 +2068,7 @@ cp_fold (tree x)
case VIEW_CONVERT_EXPR:
rval_ops = false;
+ /* FALLTHRU */
case CONVERT_EXPR:
case NOP_EXPR:
case NON_LVALUE_EXPR:
@@ -2116,6 +2117,7 @@ cp_fold (tree x)
case REALPART_EXPR:
case IMAGPART_EXPR:
rval_ops = false;
+ /* FALLTHRU */
case CONJ_EXPR:
case FIX_TRUNC_EXPR:
case FLOAT_EXPR:
@@ -2168,6 +2170,7 @@ cp_fold (tree x)
case COMPOUND_EXPR:
case MODIFY_EXPR:
rval_ops = false;
+ /* FALLTHRU */
case POINTER_PLUS_EXPR:
case PLUS_EXPR:
case MINUS_EXPR:
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 85b3047d9f1..977c6652211 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -1663,7 +1663,7 @@ build_expr_type_conversion (int desires, tree expr, bool complain)
case INTEGER_TYPE:
if ((desires & WANT_NULL) && null_ptr_cst_p (expr))
return expr;
- /* else fall through... */
+ /* fall through. */
case BOOLEAN_TYPE:
return (desires & WANT_INT) ? expr : NULL_TREE;
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 192b26cf3d9..370476c1916 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -153,6 +153,7 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
case USING_DECL:
case TEMPLATE_DECL:
t = DECL_NAME (t);
+ /* FALLTHRU */
case IDENTIFIER_NODE:
if (t == NULL)
@@ -280,6 +281,7 @@ pp_cxx_qualified_id (cxx_pretty_printer *pp, tree t)
functions and some function templates. */
case OVERLOAD:
t = OVL_CURRENT (t);
+ /* FALLTHRU */
case FUNCTION_DECL:
if (DECL_FUNCTION_MEMBER_P (t))
pp_cxx_nested_name_specifier (pp, DECL_CONTEXT (t));
@@ -331,7 +333,7 @@ cxx_pretty_printer::constant (tree t)
pp_string (this, "nullptr");
break;
}
- /* else fall through. */
+ /* fall through. */
default:
c_pretty_printer::constant (t);
@@ -417,6 +419,7 @@ cxx_pretty_printer::primary_expression (tree t)
case BASELINK:
t = BASELINK_FUNCTIONS (t);
+ /* FALLTHRU */
case VAR_DECL:
case PARM_DECL:
case FIELD_DECL:
@@ -872,7 +875,7 @@ pp_cxx_pm_expression (cxx_pretty_printer *pp, tree t)
pp_cxx_qualified_id (pp, t);
break;
}
- /* Else fall through. */
+ /* Fall through. */
case MEMBER_REF:
case DOTSTAR_EXPR:
pp_cxx_pm_expression (pp, TREE_OPERAND (t, 0));
@@ -1057,6 +1060,7 @@ cxx_pretty_printer::expression (tree t)
case OVERLOAD:
t = OVL_CURRENT (t);
+ /* FALLTHRU */
case VAR_DECL:
case PARM_DECL:
case FIELD_DECL:
@@ -1267,7 +1271,9 @@ cxx_pretty_printer::declaration_specifiers (tree t)
else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t))
declaration_specifiers (TREE_TYPE (TREE_TYPE (t)));
else
- default:
+ c_pretty_printer::declaration_specifiers (t);
+ break;
+ default:
c_pretty_printer::declaration_specifiers (t);
break;
}
@@ -1364,7 +1370,7 @@ pp_cxx_type_specifier_seq (cxx_pretty_printer *pp, tree t)
pp_cxx_ptr_operator (pp, t);
break;
}
- /* else fall through */
+ /* fall through */
default:
if (!(TREE_CODE (t) == FUNCTION_DECL && DECL_CONSTRUCTOR_P (t)))
@@ -1406,6 +1412,7 @@ pp_cxx_ptr_operator (cxx_pretty_printer *pp, tree t)
pp_star (pp);
break;
}
+ /* FALLTHRU */
case OFFSET_TYPE:
if (TYPE_PTRMEM_P (t))
{
@@ -1416,7 +1423,7 @@ pp_cxx_ptr_operator (cxx_pretty_printer *pp, tree t)
pp_cxx_cv_qualifier_seq (pp, t);
break;
}
- /* else fall through. */
+ /* fall through. */
default:
pp_unsupported_tree (pp, t);
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 0d466735f63..58cd48c0a14 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -450,7 +450,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), flags);
break;
}
- /* Else fall through. */
+ /* Fall through. */
case TEMPLATE_DECL:
case NAMESPACE_DECL:
@@ -1065,7 +1065,7 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags)
dump_type (pp, DECL_CONTEXT (t), flags);
break;
}
- /* Else fall through. */
+ /* Fall through. */
case FIELD_DECL:
case PARM_DECL:
dump_simple_decl (pp, t, TREE_TYPE (t), flags);
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index b42c6f92149..d8b5c45577f 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2169,7 +2169,7 @@ write_type (tree type)
++is_builtin_type;
break;
}
- /* else fall through. */
+ /* fall through. */
case TEMPLATE_PARM_INDEX:
write_template_param (type);
break;
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 63aa53ea9cd..75342ae5d28 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1420,6 +1420,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
case sfk_move_constructor:
case sfk_move_assignment:
move_p = true;
+ /* FALLTHRU */
case sfk_copy_constructor:
case sfk_copy_assignment:
copy_arg_p = true;
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 11957fd2806..f6ba4d27765 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -5659,6 +5659,7 @@ arg_assoc_type (struct arg_lookup *k, tree type)
case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (type))
return arg_assoc_type (k, TYPE_PTRMEMFUNC_FN_TYPE (type));
+ /* FALLTHRU */
case UNION_TYPE:
return arg_assoc_class (k, type);
case POINTER_TYPE:
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 1b9359ed050..48510d0927f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -1268,7 +1268,7 @@ cp_lexer_print_token (FILE * stream, cp_token *token)
For example, `struct' is mapped to an INTEGER_CST. */
if (!identifier_p (token->u.value))
break;
- /* else fall through */
+ /* fall through */
case CPP_NAME:
fputs (IDENTIFIER_POINTER (token->u.value), stream);
break;
@@ -5143,6 +5143,7 @@ cp_parser_primary_expression (cp_parser *parser,
cp_parser_skip_to_end_of_block_or_statement (parser);
return error_mark_node;
}
+ /* FALLTHRU */
default:
cp_parser_error (parser, "expected primary-expression");
return error_mark_node;
@@ -14096,6 +14097,7 @@ cp_parser_operator (cp_parser* parser)
case CPP_UTF8STRING:
case CPP_UTF8STRING_USERDEF:
utf8 = true;
+ /* FALLTHRU */
case CPP_STRING:
case CPP_WSTRING:
case CPP_STRING16:
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 1ee5fd4b579..5d4f5efc79d 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3450,6 +3450,7 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
case TEMPLATE_TYPE_PARM:
t = TYPE_MAIN_VARIANT (t);
+ /* FALLTHRU */
case TEMPLATE_TEMPLATE_PARM:
/* If the placeholder appears in the decl-specifier-seq of a function
parameter pack (14.6.3), or the type-specifier-seq of a type-id that
@@ -11466,7 +11467,7 @@ tsubst_aggr_type (tree t,
if (TYPE_PTRMEMFUNC_P (t))
return tsubst (TYPE_PTRMEMFUNC_FN_TYPE (t), args, complain, in_decl);
- /* Else fall through. */
+ /* Fall through. */
case ENUMERAL_TYPE:
case UNION_TYPE:
if (TYPE_TEMPLATE_INFO (t) && uses_template_parms (t))
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index a2e04f6b61d..9ab8439077a 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -6225,11 +6225,13 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
OMP_CLAUSE_OPERAND (c, 1) = t;
}
/* Check operand 0, the num argument. */
+ /* FALLTHRU */
case OMP_CLAUSE_WORKER:
case OMP_CLAUSE_VECTOR:
if (OMP_CLAUSE_OPERAND (c, 0) == NULL_TREE)
break;
+ /* FALLTHRU */
case OMP_CLAUSE_NUM_TASKS:
case OMP_CLAUSE_NUM_TEAMS:
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 2e58615e1d7..6d254ddbf14 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -141,11 +141,13 @@ lvalue_kind (const_tree ref)
lvalues. */
if (! TREE_STATIC (ref))
return clk_none;
+ /* FALLTHRU */
case VAR_DECL:
if (TREE_READONLY (ref) && ! TREE_STATIC (ref)
&& DECL_LANG_SPECIFIC (ref)
&& DECL_IN_AGGR_P (ref))
return clk_none;
+ /* FALLTHRU */
case INDIRECT_REF:
case ARROW_EXPR:
case ARRAY_REF:
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index da0987f0f43..ad256c706a0 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2867,7 +2867,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
disguised VAR_DECLs like Out parameters in Ada. */
gcc_assert (TREE_CODE (decl) == VAR_DECL);
- /* ... fall through ... */
+ /* fall through */
case RESULT_DECL:
case VAR_DECL:
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 19d8e0f0eeb..9cd647a3213 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -2875,7 +2875,7 @@ df_uses_record (struct df_collection_rec *collection_rec,
df_uses_record (collection_rec, loc, ref_type, bb, insn_info, flags);
return;
}
- /* ... Fall through ... */
+ /* Fall through */
case REG:
df_ref_record (DF_REF_REGULAR, collection_rec,
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 58f1e03e41b..d437b974526 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -461,12 +461,14 @@ do_jump (tree exp, rtx_code_label *if_false_label,
|| TREE_CODE (TREE_OPERAND (exp, 0)) == ARRAY_REF
|| TREE_CODE (TREE_OPERAND (exp, 0)) == ARRAY_RANGE_REF)
goto normal;
+ /* FALLTHRU */
case CONVERT_EXPR:
/* If we are narrowing the operand, we have to do the compare in the
narrower mode. */
if ((TYPE_PRECISION (TREE_TYPE (exp))
< TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (exp, 0)))))
goto normal;
+ /* FALLTHRU */
case NON_LVALUE_EXPR:
case ABS_EXPR:
case NEGATE_EXPR:
@@ -610,6 +612,7 @@ do_jump (tree exp, rtx_code_label *if_false_label,
goto normal;
/* Boolean comparisons can be compiled as TRUTH_AND_EXPR. */
+ /* FALLTHRU */
case TRUTH_AND_EXPR:
/* High branch cost, expand as the bitwise AND of the conditions.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 3b25358459d..1290b969312 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13338,6 +13338,7 @@ mem_loc_descriptor (rtx rtl, machine_mode mode,
if (!subreg_lowpart_p (rtl))
break;
inner = SUBREG_REG (rtl);
+ /* FALLTHRU */
case TRUNCATE:
if (inner == NULL_RTX)
inner = XEXP (rtl, 0);
@@ -13675,7 +13676,7 @@ mem_loc_descriptor (rtx rtl, machine_mode mode,
: -GET_MODE_UNIT_SIZE (mem_mode),
mode));
- /* ... fall through ... */
+ /* fall through */
case PLUS:
plus:
@@ -15601,7 +15602,7 @@ resolve_args_picking_1 (dw_loc_descr_ref loc, unsigned initial_frame_offset,
if (!resolve_args_picking_1 (l->dw_loc_next, frame_offset_, dpi,
frame_offsets))
return false;
- /* Fall through... */
+ /* Fall through. */
case DW_OP_skip:
l = l->dw_loc_oprnd1.v.val_loc;
@@ -16437,7 +16438,7 @@ loc_list_from_tree_1 (tree loc, int want_address,
TREE_OPERAND (loc, 1), TREE_OPERAND (loc, 0));
}
- /* ... fall through ... */
+ /* fall through */
case COND_EXPR:
{
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 7af0c612200..674c8f08928 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -5173,7 +5173,7 @@ make_tree (tree type, rtx x)
t = SYMBOL_REF_DECL (x);
if (t)
return fold_convert (type, build_fold_addr_expr (t));
- /* else fall through. */
+ /* fall through. */
default:
t = build_decl (RTL_LOCATION (x), VAR_DECL, NULL_TREE, type);
diff --git a/gcc/expr.c b/gcc/expr.c
index 46de35f2549..391a8058654 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8406,6 +8406,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
offset to have matching modes. */
else if (TYPE_PRECISION (sizetype) > TYPE_PRECISION (type))
treeop1 = fold_convert_loc (loc, type, treeop1);
+ /* FALLTHRU */
case PLUS_EXPR:
/* If we are adding a constant, a VAR_DECL that is sp, fp, or ap, and
@@ -9574,9 +9575,9 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
switch (TREE_CODE_LENGTH (code))
{
default:
- case 3: treeop2 = TREE_OPERAND (exp, 2);
- case 2: treeop1 = TREE_OPERAND (exp, 1);
- case 1: treeop0 = TREE_OPERAND (exp, 0);
+ case 3: treeop2 = TREE_OPERAND (exp, 2); /* FALLTHRU */
+ case 2: treeop1 = TREE_OPERAND (exp, 1); /* FALLTHRU */
+ case 1: treeop0 = TREE_OPERAND (exp, 0); /* FALLTHRU */
case 0: break;
}
ops.code = code;
@@ -9748,7 +9749,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
&& (TREE_STATIC (exp) || DECL_EXTERNAL (exp)))
layout_decl (exp, 0);
- /* ... fall through ... */
+ /* fall through */
case FUNCTION_DECL:
case RESULT_DECL:
@@ -9956,7 +9957,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
return original_target;
}
- /* ... fall through ... */
+ /* fall through */
case STRING_CST:
temp = expand_expr_constant (exp, 1, modifier);
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index c6c2bff5011..30c1e0d440a 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1300,7 +1300,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2)
return do_mpc_arg2 (arg1, arg2, type,
/* do_nonfinite= */ folding_initializer,
mpc_div);
- /* Fallthru ... */
+ /* Fallthru. */
case TRUNC_DIV_EXPR:
case CEIL_DIV_EXPR:
case FLOOR_DIV_EXPR:
@@ -3696,7 +3696,7 @@ fold_truth_not_expr (location_t loc, tree arg)
if (TREE_CODE (TREE_TYPE (arg)) == BOOLEAN_TYPE)
return build1_loc (loc, TRUTH_NOT_EXPR, type, arg);
- /* ... fall through ... */
+ /* fall through */
case FLOAT_EXPR:
loc1 = expr_location_or (TREE_OPERAND (arg, 0), loc);
@@ -5101,6 +5101,7 @@ fold_cond_expr_with_comparison (location_t loc, tree type,
case UNLT_EXPR:
if (flag_trapping_math)
break;
+ /* FALLTHRU */
case LE_EXPR:
case LT_EXPR:
if (TYPE_UNSIGNED (TREE_TYPE (arg1)))
@@ -10323,6 +10324,7 @@ fold_binary_loc (location_t loc,
/* If first arg is constant zero, return it. */
if (integer_zerop (arg0))
return fold_convert_loc (loc, type, arg0);
+ /* FALLTHRU */
case TRUTH_AND_EXPR:
/* If either arg is constant true, drop it. */
if (TREE_CODE (arg0) == INTEGER_CST && ! integer_zerop (arg0))
@@ -10378,6 +10380,7 @@ fold_binary_loc (location_t loc,
/* If first arg is constant true, return it. */
if (TREE_CODE (arg0) == INTEGER_CST && ! integer_zerop (arg0))
return fold_convert_loc (loc, type, arg0);
+ /* FALLTHRU */
case TRUTH_OR_EXPR:
/* If either arg is constant zero, drop it. */
if (TREE_CODE (arg0) == INTEGER_CST && integer_zerop (arg0))
@@ -11222,7 +11225,7 @@ contains_label_1 (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
case GOTO_EXPR:
*walk_subtrees = 0;
- /* ... fall through ... */
+ /* fall through */
default:
return NULL_TREE;
@@ -12602,7 +12605,7 @@ multiple_of_p (tree type, const_tree top, const_tree bottom)
< TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (top, 0)))))
return 0;
- /* .. fall through ... */
+ /* fall through */
case SAVE_EXPR:
return multiple_of_p (type, TREE_OPERAND (top, 0), bottom);
@@ -12657,7 +12660,7 @@ multiple_of_p (tree type, const_tree top, const_tree bottom)
return 1;
}
- /* .. fall through ... */
+ /* fall through */
default:
return 0;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 4b9b7398e80..95cd0753925 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,15 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * decl.c (match_attr_spec): Add FALLTHRU.
+ * primary.c (match_arg_list_function): Likewise.
+ * resolve.c (resolve_operator): Adjust fall through comment.
+ (fixup_charlen): Add FALLTHRU.
+ (resolve_allocate_expr): Adjust fall through comment.
+ * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
+ * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
+ comment.
+
2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
* check.c (gfc_check_random_seed): Use new seed size in check.
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 818e7d4ca98..25b0df7130f 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -3927,6 +3927,7 @@ match_attr_spec (void)
d = DECL_CODIMENSION;
break;
}
+ /* FALLTHRU */
case 'n':
if (match_string_p ("tiguous"))
{
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index c2faa0f3e10..396edf2b581 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1686,18 +1686,21 @@ match_arg_list_function (gfc_actual_arglist *result)
result->name = "%LOC";
break;
}
+ /* FALLTHRU */
case 'r':
if (strncmp (name, "ref", 3) == 0)
{
result->name = "%REF";
break;
}
+ /* FALLTHRU */
case 'v':
if (strncmp (name, "val", 3) == 0)
{
result->name = "%VAL";
break;
}
+ /* FALLTHRU */
default:
m = MATCH_ERROR;
goto cleanup;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index e0a688a76b2..d8cfdd275b6 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -3542,7 +3542,7 @@ resolve_operator (gfc_expr *e)
if (!gfc_resolve_expr (e->value.op.op2))
return false;
- /* Fall through... */
+ /* Fall through. */
case INTRINSIC_NOT:
case INTRINSIC_UPLUS:
@@ -3660,7 +3660,7 @@ resolve_operator (gfc_expr *e)
goto bad_op;
}
- /* Fall through... */
+ /* Fall through. */
case INTRINSIC_EQ:
case INTRINSIC_EQ_OS:
@@ -5419,14 +5419,17 @@ fixup_charlen (gfc_expr *e)
{
case EXPR_OP:
gfc_resolve_character_operator (e);
+ /* FALLTHRU */
case EXPR_ARRAY:
if (e->expr_type == EXPR_ARRAY)
gfc_resolve_character_array_constructor (e);
+ /* FALLTHRU */
case EXPR_SUBSTRING:
if (!e->ts.u.cl && e->ref)
gfc_resolve_substring_charlen (e);
+ /* FALLTHRU */
default:
if (!e->ts.u.cl)
@@ -7301,7 +7304,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code, bool *array_alloc_wo_spec)
&& ar->stride[i] == NULL)
break;
- /* Fall Through... */
+ /* Fall through. */
case DIMEN_UNKNOWN:
case DIMEN_VECTOR:
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 450d7db2076..bd232c28cc3 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -4041,6 +4041,7 @@ done:
continue;
}
+ /* FALLTHRU */
case GFC_SS_CONSTRUCTOR:
case GFC_SS_FUNCTION:
for (n = 0; n < ss->dimen; n++)
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index abc1c6d36fe..17dd8c266a2 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -5329,7 +5329,7 @@ gfc_conv_intrinsic_len (gfc_se * se, gfc_expr * expr)
break;
}
- /* Otherwise fall through. */
+ /* Fall through. */
default:
/* Anybody stupid enough to do this deserves inefficient code. */
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c
index f3da73cc596..d5dbf2719c1 100644
--- a/gcc/gcov-tool.c
+++ b/gcc/gcov-tool.c
@@ -547,9 +547,11 @@ process_args (int argc, char **argv)
case 'h':
print_usage (false);
/* Print_usage will exit. */
+ /* FALLTHRU */
case 'v':
print_version ();
/* Print_version will exit. */
+ /* FALLTHRU */
default:
print_usage (true);
/* Print_usage will exit. */
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index d39d4a70e92..1668e71c5ee 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -888,6 +888,7 @@ check_attr_test (file_location loc, rtx exp, attr_desc *attr)
ATTR_IND_SIMPLIFIED_P (exp) = 1;
break;
}
+ /* FALLTHRU */
default:
fatal_at (loc, "invalid operator `%s' in definition of attribute"
" `%s'", GET_RTX_NAME (GET_CODE (exp)), attr->name);
@@ -3458,6 +3459,7 @@ write_test_expr (FILE *outf, rtx exp, unsigned int attrs_cached, int flags,
case GE: case GT:
case LE: case LT:
comparison_operator = FLG_BITWISE;
+ /* FALLTHRU */
case PLUS: case MINUS: case MULT: case DIV: case MOD:
case AND: case IOR: case XOR:
diff --git a/gcc/genconfig.c b/gcc/genconfig.c
index 815e30d7330..fec80fd00b6 100644
--- a/gcc/genconfig.c
+++ b/gcc/genconfig.c
@@ -83,6 +83,7 @@ walk_insn_part (rtx part, int recog_p, int non_pc_set_src)
case MATCH_OP_DUP:
case MATCH_PAR_DUP:
++dup_operands_seen_this_insn;
+ /* FALLTHRU */
case MATCH_SCRATCH:
case MATCH_PARALLEL:
case MATCH_OPERATOR:
diff --git a/gcc/genpreds.c b/gcc/genpreds.c
index dd7dbbfc6b7..4c9dfc65664 100644
--- a/gcc/genpreds.c
+++ b/gcc/genpreds.c
@@ -51,12 +51,12 @@ validate_exp (rtx exp, const char *name, file_location loc)
case IF_THEN_ELSE:
if (validate_exp (XEXP (exp, 2), name, loc))
return true;
- /* else fall through */
+ /* fall through */
case AND:
case IOR:
if (validate_exp (XEXP (exp, 1), name, loc))
return true;
- /* else fall through */
+ /* fall through */
case NOT:
return validate_exp (XEXP (exp, 0), name, loc);
@@ -174,12 +174,12 @@ needs_variable (rtx exp, const char *var)
case IF_THEN_ELSE:
if (needs_variable (XEXP (exp, 2), var))
return true;
- /* else fall through */
+ /* fall through */
case AND:
case IOR:
if (needs_variable (XEXP (exp, 1), var))
return true;
- /* else fall through */
+ /* fall through */
case NOT:
return needs_variable (XEXP (exp, 0), var);
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index 0eb45919ec8..7e3aad33000 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1038,6 +1038,7 @@ get_alternatives_number (rtx pattern, int *n_alt, file_location loc)
case 'V':
if (XVEC (pattern, i) == NULL)
break;
+ /* FALLTHRU */
case 'E':
for (j = XVECLEN (pattern, i) - 1; j >= 0; --j)
@@ -2156,6 +2157,7 @@ subst_dup (rtx pattern, int n_alt, int n_subst_alt)
case 'V':
if (XVEC (pattern, i) == NULL)
break;
+ /* FALLTHRU */
case 'E':
if (code != MATCH_DUP && code != MATCH_OP_DUP)
for (j = XVECLEN (pattern, i) - 1; j >= 0; --j)
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 48edacce148..12d9a9c577b 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -517,8 +517,10 @@ dump_gimple_assign (pretty_printer *buffer, gassign *gs, int spc, int flags)
{
case 4:
arg3 = gimple_assign_rhs3 (gs);
+ /* FALLTHRU */
case 3:
arg2 = gimple_assign_rhs2 (gs);
+ /* FALLTHRU */
case 2:
arg1 = gimple_assign_rhs1 (gs);
break;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index fb27dd0e75a..1e43dbb51cd 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -5190,7 +5190,7 @@ gimplify_addr_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
if (integer_zerop (TREE_OPERAND (op0, 1)))
goto do_indirect_ref;
- /* ... fall through ... */
+ /* fall through */
default:
/* If we see a call to a declared builtin or see its address
@@ -6941,6 +6941,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
case OACC_DATA:
if (TREE_CODE (TREE_TYPE (decl)) != ARRAY_TYPE)
break;
+ /* FALLTHRU */
case OMP_TARGET_DATA:
case OMP_TARGET_ENTER_DATA:
case OMP_TARGET_EXIT_DATA:
@@ -9964,6 +9965,7 @@ goa_stabilize_expr (tree *expr_p, gimple_seq *pre_p, tree lhs_addr,
case tcc_comparison:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 1), pre_p, lhs_addr,
lhs_var);
+ /* FALLTHRU */
case tcc_unary:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 0), pre_p, lhs_addr,
lhs_var);
@@ -9978,6 +9980,7 @@ goa_stabilize_expr (tree *expr_p, gimple_seq *pre_p, tree lhs_addr,
case TRUTH_XOR_EXPR:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 1), pre_p,
lhs_addr, lhs_var);
+ /* FALLTHRU */
case TRUTH_NOT_EXPR:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 0), pre_p,
lhs_addr, lhs_var);
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 07c88026cde..0eb564ad2a2 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -1496,7 +1496,7 @@ substitute_ssa_name (tree exp, tree f, tree r)
if (exp == f)
return r;
- /* Fall through... */
+ /* Fall through. */
case tcc_exceptional:
case tcc_unary:
diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index fa4ef126ac5..fb6d8a2dd8d 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -4519,7 +4519,7 @@ get_address_from_value (tree val, hsa_bb *hbb)
case INTEGER_CST:
if (tree_fits_shwi_p (val))
return new hsa_op_address (NULL, NULL, tree_to_shwi (val));
- /* Otherwise fall-through */
+ /* fall-through */
default:
HSA_SORRY_ATV (EXPR_LOCATION (val),
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 3c04b5abc32..f29d929cf67 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -1643,7 +1643,7 @@ sem_function::hash_stmt (gimple *stmt, inchash::hash &hstate)
add_type (TREE_TYPE (gimple_assign_lhs (stmt)), two);
break;
}
- /* ... fall through ... */
+ /* fall through */
case GIMPLE_CALL:
case GIMPLE_ASM:
case GIMPLE_COND:
diff --git a/gcc/ira.c b/gcc/ira.c
index c66bb9e78fc..f8a59e3cd64 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1832,6 +1832,7 @@ ira_setup_alts (rtx_insn *insn, HARD_REG_SET &alts)
case '#':
case ',':
c = '\0';
+ /* FALLTHRU */
case '\0':
len = 0;
break;
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 87e25bcfbe6..ba2ab906312 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * expr.c (java_truthvalue_conversion): Adjust fall through comment.
+ * jcf-io.c (verify_constant_pool): Likewise.
+ * typeck.c (promote_type): Likewise.
+
2016-08-02 Roger Sayle <roger@nextmovesoftware.com>
* expr.c (push_value): Only call flush_quick_stack for non-constant
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index b625a1d58da..ba798ca3165 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -192,7 +192,7 @@ java_truthvalue_conversion (tree expr)
if (TYPE_PRECISION (TREE_TYPE (expr))
>= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0))))
return java_truthvalue_conversion (TREE_OPERAND (expr, 0));
- /* fall through to default */
+ /* fall through */
default:
return fold_build2 (NE_EXPR, boolean_type_node,
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c
index a560db7b53d..cc8616b8638 100644
--- a/gcc/java/jcf-io.c
+++ b/gcc/java/jcf-io.c
@@ -471,7 +471,7 @@ verify_constant_pool (JCF *jcf)
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_Utf8)
return i;
- /* ... fall through ... */
+ /* fall through */
case CONSTANT_Class:
case CONSTANT_String:
n = JPOOL_USHORT1 (jcf, i);
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index d2e3db6e4b3..61394a982da 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -341,7 +341,7 @@ promote_type (tree type)
return promoted_byte_type_node;
return int_type_node;
}
- /* ... else fall through ... */
+ /* fall through */
default:
return type;
}
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index 9ae5cfea5ab..08cc39011d1 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -484,7 +484,7 @@ lra_eliminate_regs_1 (rtx_insn *insn, rtx x, machine_mode mem_mode,
return gen_rtx_MULT (Pmode, to, XEXP (x, 1));
}
- /* ... fall through ... */
+ /* fall through */
case CALL:
case COMPARE:
@@ -536,7 +536,7 @@ lra_eliminate_regs_1 (rtx_insn *insn, rtx x, machine_mode mem_mode,
}
}
- /* ... fall through ... */
+ /* fall through */
case INSN_LIST:
case INT_LIST:
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index bc45721f077..986b1595023 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -231,6 +231,7 @@ lto_output_tree_ref (struct output_block *ob, tree expr)
case VAR_DECL:
case DEBUG_EXPR_DECL:
gcc_assert (decl_function_context (expr) == NULL || TREE_STATIC (expr));
+ /* FALLTHRU */
case PARM_DECL:
streamer_write_record_start (ob, LTO_global_decl_ref);
lto_output_var_decl_index (ob->decl_state, ob->main_stream, expr);
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index ddc670a4375..cf735d125e1 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * objc-encoding.c (encode_type): Add FALLTHRU.
+
2016-06-07 David Malcolm <dmalcolm@redhat.com>
* objc-act.c (objc_build_component_ref): Update call
diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.c
index 95e9c8bd272..8fc2e5d74ed 100644
--- a/gcc/objc/objc-encoding.c
+++ b/gcc/objc/objc-encoding.c
@@ -622,6 +622,7 @@ encode_type (tree type, int curtype, int format)
}
/* Else, they are encoded exactly like the integer type that is
used by the compiler to store them. */
+ /* FALLTHRU */
case INTEGER_TYPE:
{
char c;
diff --git a/gcc/opts.c b/gcc/opts.c
index 4053fb1db0a..b927640c1f7 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1980,6 +1980,7 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_profile_use = true;
value = true;
/* No break here - do -fprofile-use processing. */
+ /* FALLTHRU */
case OPT_fprofile_use:
enable_fdo_optimizations (opts, opts_set, value);
if (!opts_set->x_flag_profile_reorder_functions)
@@ -1996,6 +1997,7 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_auto_profile = true;
value = true;
/* No break here - do -fauto-profile processing. */
+ /* FALLTHRU */
case OPT_fauto_profile:
enable_fdo_optimizations (opts, opts_set, value);
if (!opts_set->x_flag_profile_correction)
@@ -2009,6 +2011,7 @@ common_handle_option (struct gcc_options *opts,
opts->x_profile_data_prefix = xstrdup (arg);
value = true;
/* No break here - do -fprofile-generate processing. */
+ /* FALLTHRU */
case OPT_fprofile_generate:
if (!opts_set->x_profile_arc_flag)
opts->x_profile_arc_flag = value;
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index a705859a9db..4614e356f7a 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -1163,6 +1163,7 @@ read_rtx_code (const char *code_name)
break;
}
/* Now process the vector. */
+ /* FALLTHRU */
case 'E':
{
diff --git a/gcc/real.c b/gcc/real.c
index b009ed607ed..25f0a5b1466 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -2667,6 +2667,7 @@ round_for_format (const struct real_format *fmt, REAL_VALUE_TYPE *r)
{
underflow:
get_zero (r, r->sign);
+ /* FALLTHRU */
case rvc_zero:
if (!fmt->has_signed_zero)
r->sign = 0;
diff --git a/gcc/recog.c b/gcc/recog.c
index f425e47f498..19ab5744dd0 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1792,6 +1792,7 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
Match any memory and hope things are resolved after reload. */
incdec_ok = true;
+ /* FALLTHRU */
default:
cn = lookup_constraint (constraint);
switch (get_constraint_type (cn))
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index f4dac083045..0cda6aa6200 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -1149,7 +1149,7 @@ reg_scan_mark_refs (rtx x, rtx_insn *insn)
if (REG_P (dest) && !REG_ATTRS (dest))
set_reg_attrs_from_value (dest, SET_SRC (x));
- /* ... fall through ... */
+ /* fall through */
default:
{
diff --git a/gcc/reload1.c b/gcc/reload1.c
index ce042bf69c5..04cf2125c5b 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2328,7 +2328,7 @@ set_label_offsets (rtx x, rtx_insn *insn, int initial_p)
x = LABEL_REF_LABEL (x);
- /* ... fall through ... */
+ /* fall through */
case CODE_LABEL:
/* If we know nothing about this label, set the desired offsets. Note
@@ -2375,7 +2375,7 @@ set_label_offsets (rtx x, rtx_insn *insn, int initial_p)
case JUMP_INSN:
set_label_offsets (PATTERN (insn), insn, initial_p);
- /* ... fall through ... */
+ /* fall through */
case INSN:
case CALL_INSN:
@@ -2690,7 +2690,7 @@ eliminate_regs_1 (rtx x, machine_mode mem_mode, rtx insn,
ep->previous_offset * INTVAL (XEXP (x, 1)));
}
- /* ... fall through ... */
+ /* fall through */
case CALL:
case COMPARE:
@@ -2737,7 +2737,7 @@ eliminate_regs_1 (rtx x, machine_mode mem_mode, rtx insn,
}
}
- /* ... fall through ... */
+ /* fall through */
case INSN_LIST:
case INT_LIST:
@@ -5499,7 +5499,7 @@ reload_reg_reaches_end_p (unsigned int regno, int reloadnum)
opnum = reload_n_operands;
- /* ... fall through ... */
+ /* fall through */
case RELOAD_FOR_OUTPUT:
case RELOAD_FOR_OUTPUT_ADDRESS:
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 94453295063..6470c4377ea 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3421,6 +3421,7 @@ commutative_operand_precedence (rtx op)
/* Then prefer NEG and NOT. */
if (code == NEG || code == NOT)
return 1;
+ /* FALLTHRU */
default:
return 0;
@@ -4095,7 +4096,7 @@ rtx_cost (rtx x, machine_mode mode, enum rtx_code outer_code,
factor = GET_MODE_SIZE (mode) / UNITS_PER_WORD;
if (factor == 0)
factor = 1;
- /* Pass through. */
+ /* FALLTHRU */
default:
total = factor * COSTS_N_INSNS (1);
}
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index bfb8d8f97ed..f6d1c91f768 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -2036,6 +2036,7 @@ is_exception_free (rtx_insn *insn, int bb_src, int bb_trg)
if (is_pfree (insn, bb_src, bb_trg))
return 1;
/* Don't 'break' here: PFREE-candidate is also PRISKY-candidate. */
+ /* FALLTHRU */
case PRISKY_CANDIDATE:
if (!flag_schedule_speculative_load_dangerous
|| is_prisky (insn, bb_src, bb_trg))
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 691c2c1b678..2085b997416 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -6256,7 +6256,7 @@ simplify_rtx (const_rtx x)
if (swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
return simplify_gen_binary (code, mode, XEXP (x, 1), XEXP (x, 0));
- /* Fall through.... */
+ /* Fall through. */
case RTX_BIN_ARITH:
return simplify_binary_operation (code, mode, XEXP (x, 0), XEXP (x, 1));
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 62ab80457b6..cf7171430f9 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -398,7 +398,7 @@ int_mode_for_mode (machine_mode mode)
if (mode == BLKmode)
break;
- /* ... fall through ... */
+ /* fall through */
case MODE_CC:
default:
diff --git a/gcc/toplev.c b/gcc/toplev.c
index ddaee8a55c1..26079047219 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -731,7 +731,7 @@ print_to_asm_out_file (print_switch_type type, const char * text)
case SWITCH_TYPE_DESCRIPTIVE:
if (ASM_COMMENT_START[0] == 0)
prepend_sep = false;
- /* Drop through. */
+ /* FALLTHRU */
case SWITCH_TYPE_PASSED:
case SWITCH_TYPE_ENABLED:
if (prepend_sep)
@@ -761,7 +761,7 @@ print_to_stderr (print_switch_type type, const char * text)
case SWITCH_TYPE_PASSED:
case SWITCH_TYPE_ENABLED:
fputc (' ', stderr);
- /* Drop through. */
+ /* FALLTHRU */
case SWITCH_TYPE_DESCRIPTIVE:
fputs (text, stderr);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 07280202ba3..4036223e7e6 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5412,7 +5412,7 @@ gimple_verify_flow_info (void)
case GIMPLE_CALL:
if (!gimple_call_builtin_p (stmt, BUILT_IN_RETURN))
break;
- /* ... fallthru ... */
+ /* fallthru */
case GIMPLE_RETURN:
if (!single_succ_p (bb)
|| (single_succ_edge (bb)->flags
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c
index 707a3aa988e..79f07b029d1 100644
--- a/gcc/tree-chrec.c
+++ b/gcc/tree-chrec.c
@@ -287,6 +287,7 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
CASE_CONVERT:
if (tree_contains_chrecs (op1, NULL))
return chrec_dont_know;
+ /* FALLTHRU */
default:
if (code == PLUS_EXPR || code == POINTER_PLUS_EXPR)
@@ -304,6 +305,7 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
CASE_CONVERT:
if (tree_contains_chrecs (op0, NULL))
return chrec_dont_know;
+ /* FALLTHRU */
default:
switch (TREE_CODE (op1))
@@ -329,6 +331,7 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
CASE_CONVERT:
if (tree_contains_chrecs (op1, NULL))
return chrec_dont_know;
+ /* FALLTHRU */
default:
{
@@ -423,6 +426,7 @@ chrec_fold_multiply (tree type,
CASE_CONVERT:
if (tree_contains_chrecs (op1, NULL))
return chrec_dont_know;
+ /* FALLTHRU */
default:
if (integer_onep (op1))
@@ -439,6 +443,7 @@ chrec_fold_multiply (tree type,
CASE_CONVERT:
if (tree_contains_chrecs (op0, NULL))
return chrec_dont_know;
+ /* FALLTHRU */
default:
if (integer_onep (op0))
@@ -461,6 +466,7 @@ chrec_fold_multiply (tree type,
CASE_CONVERT:
if (tree_contains_chrecs (op1, NULL))
return chrec_dont_know;
+ /* FALLTHRU */
default:
if (integer_onep (op1))
@@ -1026,6 +1032,7 @@ evolution_function_is_invariant_rec_p (tree chrec, int loopnum)
if (!evolution_function_is_invariant_rec_p (TREE_OPERAND (chrec, 1),
loopnum))
return false;
+ /* FALLTHRU */
case 1:
if (!evolution_function_is_invariant_rec_p (TREE_OPERAND (chrec, 0),
@@ -1533,12 +1540,15 @@ for_each_scev_op (tree *scev, bool (*cbck) (tree *, void *), void *data)
{
case 3:
for_each_scev_op (&TREE_OPERAND (*scev, 2), cbck, data);
+ /* FALLTHRU */
case 2:
for_each_scev_op (&TREE_OPERAND (*scev, 1), cbck, data);
+ /* FALLTHRU */
case 1:
for_each_scev_op (&TREE_OPERAND (*scev, 0), cbck, data);
+ /* FALLTHRU */
default:
cbck (scev, data);
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 081ee603193..58da248040f 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -1685,6 +1685,7 @@ siv_subscript_p (const_tree chrec_a, const_tree chrec_b)
case POLYNOMIAL_CHREC:
if (CHREC_VARIABLE (chrec_a) != CHREC_VARIABLE (chrec_b))
return false;
+ /* FALLTHRU */
default:
return true;
@@ -3890,6 +3891,7 @@ get_references_in_stmt (gimple *stmt, vec<data_ref_loc, va_heap> *references)
if (gimple_call_lhs (stmt) == NULL_TREE)
break;
ref.is_read = true;
+ /* FALLTHRU */
case IFN_MASK_STORE:
ptr = build_int_cst (TREE_TYPE (gimple_call_arg (stmt, 1)), 0);
align = tree_to_shwi (gimple_call_arg (stmt, 1));
diff --git a/gcc/tree.c b/gcc/tree.c
index 11d3b51e312..6efc30ce5c8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3727,7 +3727,7 @@ find_placeholder_in_expr (tree exp, vec<tree> *refs)
break;
}
- /* Fall through... */
+ /* Fall through. */
case tcc_exceptional:
case tcc_unary:
@@ -3816,7 +3816,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (exp == f)
return r;
- /* Fall through... */
+ /* Fall through. */
case tcc_exceptional:
case tcc_unary:
@@ -7027,7 +7027,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b)
TYPE_VALUES (b->type))))
return 0;
- /* ... fall through ... */
+ /* fall through */
case INTEGER_TYPE:
case REAL_TYPE:
@@ -11564,7 +11564,7 @@ walk_type_fields (tree type, walk_tree_fn func, void *data,
break;
}
- /* ... fall through ... */
+ /* fall through */
case COMPLEX_TYPE:
WALK_SUBTREE (TREE_TYPE (type));
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 90889786011..fdad87459fb 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -1056,6 +1056,7 @@ adjust_mems (rtx loc, const_rtx old_rtx, void *data)
? GET_MODE_SIZE (amd->mem_mode)
: -GET_MODE_SIZE (amd->mem_mode),
GET_MODE (loc)));
+ /* FALLTHRU */
case POST_INC:
case POST_DEC:
if (addr == loc)
@@ -1076,6 +1077,7 @@ adjust_mems (rtx loc, const_rtx old_rtx, void *data)
return addr;
case PRE_MODIFY:
addr = XEXP (loc, 1);
+ /* FALLTHRU */
case POST_MODIFY:
if (addr == loc)
addr = XEXP (loc, 0);
@@ -3148,7 +3150,7 @@ set_dv_changed (decl_or_value dv, bool newv)
case ONEPART_DEXPR:
if (newv)
NO_LOC_P (DECL_RTL_KNOWN_SET (dv_as_decl (dv))) = false;
- /* Fall through... */
+ /* Fall through. */
default:
DECL_CHANGED (dv_as_decl (dv)) = newv;
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 4ef6115455c..e747d2c4721 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -589,6 +589,7 @@ default_function_section (tree decl, enum node_frequency freq,
these ELF section. */
if (!in_lto_p || !flag_profile_values)
return get_named_text_section (decl, ".text.hot", NULL);
+ /* FALLTHRU */
default:
return NULL;
}
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index f7cc1c410fa..c049599784b 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,13 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * lex.c (search_line_fast): Add FALLTHRU.
+ (_cpp_lex_direct): Likewise.
+ (cpp_token_val_index): Adjust fall through comment.
+ * macro.c (parse_params): Add FALLTHRU.
+ * pch.c (count_defs): Adjust fall through comment.
+ (write_defs): Likewise.
+
2016-08-06 David Malcolm <dmalcolm@redhat.com>
PR bootstrap/72823
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 4e71965ebe7..6254ed69ca2 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -610,6 +610,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
if (l != 0)
break;
s += sizeof(unsigned long);
+ /* FALLTHRU */
case 2:
l = u.l[i++];
if (l != 0)
@@ -2717,6 +2718,7 @@ _cpp_lex_direct (cpp_reader *pfile)
}
buffer->cur++;
}
+ /* FALLTHRU */
default:
create_literal (pfile, result, buffer->cur - 1, 1, CPP_OTHER);
@@ -3322,7 +3324,7 @@ cpp_token_val_index (const cpp_token *tok)
return CPP_TOKEN_FLD_SOURCE;
else if (tok->type == CPP_PRAGMA)
return CPP_TOKEN_FLD_PRAGMA;
- /* else fall through */
+ /* fall through */
default:
return CPP_TOKEN_FLD_NONE;
}
diff --git a/libcpp/macro.c b/libcpp/macro.c
index a3b8348a23f..147fcf53a88 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -2886,6 +2886,7 @@ parse_params (cpp_reader *pfile, cpp_macro *macro)
return true;
/* Fall through to pick up the error. */
+ /* FALLTHRU */
case CPP_COMMA:
if (!prev_ident)
{
diff --git a/libcpp/pch.c b/libcpp/pch.c
index aa5ed6b37d9..fb9696d5769 100644
--- a/libcpp/pch.c
+++ b/libcpp/pch.c
@@ -230,7 +230,7 @@ count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p)
if (hn->flags & NODE_BUILTIN)
return 1;
- /* else fall through. */
+ /* fall through. */
case NT_VOID:
{
@@ -269,7 +269,7 @@ write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p)
if (hn->flags & NODE_BUILTIN)
return 1;
- /* else fall through. */
+ /* fall through. */
case NT_VOID:
{
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index e7ff8c3d337..0b97a904c6f 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * cp-demangle.c (d_print_mod): Add FALLTHRU.
+
2016-08-04 Marcel Böhme <boehme.marcel@gmail.com>
PR c++/71696
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 0c6d71436e3..1c2bce29179 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -5777,11 +5777,13 @@ d_print_mod (struct d_print_info *dpi, int options,
case DEMANGLE_COMPONENT_REFERENCE_THIS:
/* For the ref-qualifier, put a space before the &. */
d_append_char (dpi, ' ');
+ /* FALLTHRU */
case DEMANGLE_COMPONENT_REFERENCE:
d_append_char (dpi, '&');
return;
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
d_append_char (dpi, ' ');
+ /* FALLTHRU */
case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
d_append_string (dpi, "&&");
return;