diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-01 14:59:50 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-01 14:59:50 +0000 |
commit | c7afb7822660a768be77fbeb63f93205e9ca9cd9 (patch) | |
tree | c6953867918ca0a6a2b88c76240d748598ee1ef1 | |
parent | f243884d773037e664e98c3040048892344ac2af (diff) | |
download | gcc-c7afb7822660a768be77fbeb63f93205e9ca9cd9.tar.gz |
PR c/7652
gcc/c-family/
* c-common.c (resolve_overloaded_builtin): Fix formatting. Add
FALLTHRU comments.
gcc/c/
* c-typeck.c (composite_type): Add FALLTHRU comment.
gcc/gcc/cp/
* error.c (dump_type): Fix falls through comment.
(dump_decl): Likewise.
(dump_expr): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239939 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 18 | ||||
-rw-r--r-- | gcc/c/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/error.c | 6 |
6 files changed, 29 insertions, 15 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 2a38deb1666..8a40f75da4f 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2016-09-01 Marek Polacek <polacek@redhat.com> + + PR c/7652 + * c-common.c (resolve_overloaded_builtin): Fix formatting. Add + FALLTHRU comments. + 2016-08-29 Marek Polacek <polacek@redhat.com> PR c/77292 diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index b29334ad9af..399ba975184 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -11547,7 +11547,7 @@ resolve_overloaded_builtin (location_t loc, tree function, /* Handle these 4 together so that they can fall through to the next case if the call is transformed to an _N variant. */ switch (orig_code) - { + { case BUILT_IN_ATOMIC_EXCHANGE: { if (resolve_overloaded_atomic_exchange (loc, function, params, @@ -11588,17 +11588,15 @@ resolve_overloaded_builtin (location_t loc, tree function, } default: gcc_unreachable (); - } - /* Fallthrough to the normal processing. */ + } } + /* FALLTHRU */ case BUILT_IN_ATOMIC_EXCHANGE_N: case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_N: case BUILT_IN_ATOMIC_LOAD_N: case BUILT_IN_ATOMIC_STORE_N: - { - fetch_op = false; - /* Fallthrough to further processing. */ - } + fetch_op = false; + /* FALLTHRU */ case BUILT_IN_ATOMIC_ADD_FETCH_N: case BUILT_IN_ATOMIC_SUB_FETCH_N: case BUILT_IN_ATOMIC_AND_FETCH_N: @@ -11611,10 +11609,8 @@ resolve_overloaded_builtin (location_t loc, tree function, case BUILT_IN_ATOMIC_FETCH_NAND_N: case BUILT_IN_ATOMIC_FETCH_XOR_N: case BUILT_IN_ATOMIC_FETCH_OR_N: - { - orig_format = false; - /* Fallthru for parameter processing. */ - } + orig_format = false; + /* FALLTHRU */ case BUILT_IN_SYNC_FETCH_AND_ADD_N: case BUILT_IN_SYNC_FETCH_AND_SUB_N: case BUILT_IN_SYNC_FETCH_AND_OR_N: diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 3ac6648b45a..6b00f9a5f1e 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2016-09-01 Marek Polacek <polacek@redhat.com> + + PR c/7652 + * c-typeck.c (composite_type): Add FALLTHRU comment. + 2016-08-31 David Malcolm <dmalcolm@redhat.com> * c-parser.c (c_parser_declaration_or_fndef): Add trailing space diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 51940273d69..fc7a71ef21a 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -605,8 +605,8 @@ composite_type (tree t1, tree t2) t1 = build_function_type (valtype, newargs); t1 = qualify_type (t1, t2); - /* ... falls through ... */ } + /* FALLTHRU */ default: return build_type_attribute_variant (t1, attributes); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c553796d7bf..e68ee629600 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2016-09-01 Marek Polacek <polacek@redhat.com> + + PR c/7652 + * error.c (dump_type): Fix falls through comment. + (dump_decl): Likewise. + (dump_expr): Likewise. + 2016-08-30 David Malcolm <dmalcolm@redhat.com> * parser.c (cp_parser_enclosed_template_argument_list): Add fix-it diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 58cd48c0a14..88049ee8f1a 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -575,7 +575,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags) default: pp_unsupported_tree (pp, t); - /* Fall through to error. */ + /* Fall through. */ case ERROR_MARK: pp_string (pp, M_("<type error>")); @@ -1276,7 +1276,7 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags) default: pp_unsupported_tree (pp, t); - /* Fall through to error. */ + /* Fall through. */ case ERROR_MARK: pp_string (pp, M_("<declaration error>")); @@ -2777,7 +2777,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) `report_error_function'. That could cause an infinite loop. */ default: pp_unsupported_tree (pp, t); - /* fall through to ERROR_MARK... */ + /* Fall through. */ case ERROR_MARK: pp_string (pp, M_("<expression error>")); break; |