-
- Downloads
re PR c/79153 (-Wimplicit-fallthrough missed warning)
PR c/79153 * tree.h (SWITCH_BREAK_LABEL_P): Define. * gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with SWITCH_BREAK_LABEL_P set on the label. (gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label added for default case if it was missing and not all cases covered. Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P set on the label. * tree-chrec.c (evolution_function_is_univariate_p): Add return true; to avoid -Wimplicit-fallthrough warning. * config/i386/i386.c (ix86_expand_special_args_builtin): Add FALLTHRU comment to avoid -Wimplicit-fallthrough warning. c/ * c-parser.c: Include tree-iterator.h. (c_parser_switch_statement): Emit LABEL_EXPR for the break label into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P on it. cp/ * cp-gimplify.c (genericize_switch_stmt): Emit LABEL_EXPR for the break label into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P on it. * parser.c (cp_parser_objc_expression): Add FALLTHRU comment to avoid -Wimplicit-fallthrough warning. fortran/ * match.c (gfc_match): Add FALLTHRU comment to avoid -Wimplicit-fallthrough warning. testsuite/ * c-c++-common/Wimplicit-fallthrough-7.c: Adjust expected warning line. * c-c++-common/Wimplicit-fallthrough-36.c: New test. From-SVN: r255298
Showing
- gcc/ChangeLog 15 additions, 0 deletionsgcc/ChangeLog
- gcc/c/ChangeLog 6 additions, 0 deletionsgcc/c/ChangeLog
- gcc/c/c-parser.c 4 additions, 2 deletionsgcc/c/c-parser.c
- gcc/config/i386/i386.c 1 addition, 0 deletionsgcc/config/i386/i386.c
- gcc/cp/ChangeLog 9 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/cp-gimplify.c 3 additions, 1 deletiongcc/cp/cp-gimplify.c
- gcc/cp/parser.c 1 addition, 0 deletionsgcc/cp/parser.c
- gcc/fortran/ChangeLog 6 additions, 0 deletionsgcc/fortran/ChangeLog
- gcc/fortran/match.c 1 addition, 0 deletionsgcc/fortran/match.c
- gcc/gimplify.c 57 additions, 3 deletionsgcc/gimplify.c
- gcc/testsuite/ChangeLog 5 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/c-c++-common/Wimplicit-fallthrough-36.c 72 additions, 0 deletionsgcc/testsuite/c-c++-common/Wimplicit-fallthrough-36.c
- gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c 2 additions, 2 deletionsgcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c
- gcc/tree-chrec.c 1 addition, 0 deletionsgcc/tree-chrec.c
- gcc/tree.h 5 additions, 0 deletionsgcc/tree.h
Loading
Please register or sign in to comment