diff options
author | Marek Polacek <polacek@redhat.com> | 2016-08-12 10:30:47 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-08-12 10:30:47 +0000 |
commit | 191816a36b90e5230ae285940f7ad1e225b66487 (patch) | |
tree | 9e07add4f559a5724126b339e6def3c8d3a7ae1a /gcc/cp | |
parent | 0c44e080f57a7c9d334005c2ceac08139d1d276b (diff) | |
download | gcc-191816a36b90e5230ae285940f7ad1e225b66487.zip gcc-191816a36b90e5230ae285940f7ad1e225b66487.tar.gz gcc-191816a36b90e5230ae285940f7ad1e225b66487.tar.bz2 |
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through)
PR c/7652
gcc/
* 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.
gcc/c-family/
* 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.
gcc/c/
* 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.
gcc/cp/
* 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.
gcc/fortran/
* 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.
gcc/java/
* expr.c (java_truthvalue_conversion): Adjust fall through comment.
* jcf-io.c (verify_constant_pool): Likewise.
* typeck.c (promote_type): Likewise.
gcc/objc/
* objc-encoding.c (encode_type): Add FALLTHRU.
libcpp/
* 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.
libiberty/
* cp-demangle.c (d_print_mod): Add FALLTHRU.
From-SVN: r239410
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 35 | ||||
-rw-r--r-- | gcc/cp/call.c | 9 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 | ||||
-rw-r--r-- | gcc/cp/constexpr.c | 7 | ||||
-rw-r--r-- | gcc/cp/cp-gimplify.c | 5 | ||||
-rw-r--r-- | gcc/cp/cvt.c | 2 | ||||
-rw-r--r-- | gcc/cp/cxx-pretty-print.c | 17 | ||||
-rw-r--r-- | gcc/cp/error.c | 4 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 2 | ||||
-rw-r--r-- | gcc/cp/method.c | 1 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 1 | ||||
-rw-r--r-- | gcc/cp/parser.c | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 2 |
15 files changed, 78 insertions, 18 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4049c76..52965b8 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 918661a..0203cd1 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 10286a7..3ad1b89 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 cb0fdee..5d97a4b 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 e28c9df..6d514d0 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 85b3047..977c665 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 192b26c..370476c 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 0d46673..58cd48c 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 b42c6f9..d8b5c45 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 63aa53e..75342ae 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 11957fd..f6ba4d2 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 1b9359e..48510d0 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 1ee5fd4..5d4f5ef 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 a2e04f6..9ab8439 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 2e58615..6d254dd 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: |