diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 9a65d945232..6d9b712e243 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -7364,9 +7364,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser, if (postfix_expression != current_class_ref && scope != error_mark_node && !(processing_template_decl - && current_class_type - && (same_type_ignoring_top_level_qualifiers_p - (scope, current_class_type)))) + && currently_open_class (scope))) { scope = complete_type (scope); if (!COMPLETE_TYPE_P (scope) @@ -12103,12 +12101,9 @@ cp_parser_init_statement (cp_parser* parser, tree *decl) cp_lexer_consume_token (parser->lexer); is_range_for = true; if (cxx_dialect < cxx11) - { - pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, - "range-based %<for%> loops only available with " - "-std=c++11 or -std=gnu++11"); - *decl = error_mark_node; - } + pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, + "range-based %<for%> loops only available with " + "-std=c++11 or -std=gnu++11"); } else /* The ';' is not consumed yet because we told |