From: Jakub Jelinek Date: Tue, 10 Apr 2018 14:28:54 +0000 (+0200) Subject: PR c++/85312 - P0962 cleanup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e6b73b1c00c7025b344af2796539aef61ef5474;p=gcc.git PR c++/85312 - P0962 cleanup PR c++/85312 - P0962 cleanup * parser.c (cp_parser_perform_range_for_lookup): Remove unreachable diagnostics. From-SVN: r259279 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 42c3771b98d..eeb1b2a9a21 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2018-04-10 Jakub Jelinek + + PR c++/85312 - P0962 cleanup + * parser.c (cp_parser_perform_range_for_lookup): Remove unreachable + diagnostics. + 2018-04-10 Jason Merrill PR debug/65821 - wrong location for main(). diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 849a75a1a51..8b1b271b53d 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -12041,17 +12041,8 @@ cp_parser_perform_range_for_lookup (tree range, tree *begin, tree *end) if (member_begin != NULL_TREE && member_end != NULL_TREE) { /* Use the member functions. */ - if (member_begin != NULL_TREE) - *begin = cp_parser_range_for_member_function (range, id_begin); - else - error ("range-based % expression of type %qT has an " - "% member but not a %", TREE_TYPE (range)); - - if (member_end != NULL_TREE) - *end = cp_parser_range_for_member_function (range, id_end); - else - error ("range-based % expression of type %qT has a " - "% member but not an %", TREE_TYPE (range)); + *begin = cp_parser_range_for_member_function (range, id_begin); + *end = cp_parser_range_for_member_function (range, id_end); } else {