--- gcc/cp/cp-tree.h | 2 +- gcc/cp/decl.c | 3 ++- gcc/cp/lambda.c | 2 +- gcc/cp/parser.c | 6 ++---- gcc/cp/pt.c | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 64ff4e3..17bb8b9 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1089,7 +1089,7 @@ struct GTY(()) saved_scope { #define processing_specialization scope_chain->x_processing_specialization #define processing_explicit_instantiation scope_chain->x_processing_explicit_instantiation -/* Nonzero if the function being declared was made a template due to it's +/* Nonzero if the function being declared was made a template due to its parameter list containing generic type specifiers (`auto' or concept identifiers) rather than an explicit template parameter list. */ diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 98e8dc9..72332ba 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10331,7 +10331,8 @@ grokdeclarator (const cp_declarator *declarator, if (type_uses_auto (type) && cxx_dialect < cxx1y) { - error ("parameter declared %<auto%> (unsupported prior to C++1y)"); + error ("use of %<auto%> in parameter declaration only available with " + "-std=c++1y or -std=gnu++1y"); type = error_mark_node; } diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index cf662bb..015e6d1 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -776,7 +776,7 @@ maybe_add_lambda_conv_op (tree type) if (generic_lambda_p) { /* Construct the dependent member call for the static member function - '_FUN' and remove 'auto' from it's return type to allow for simple + '_FUN' and remove 'auto' from its return type to allow for simple implementation of the conversion operator. */ tree instance = build_nop (type, null_pointer_node); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 45f5d7e..5169f66 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8821,9 +8821,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) if (cxx_dialect < cxx1y) cp_parser_error (parser, - "Generic lambdas are only supported in C++1y mode."); - - push_deferring_access_checks (dk_deferred); + "generic lambdas are only available with " + "-std=c++1y or -std=gnu++1y"); template_param_list = cp_parser_template_parameter_list (parser); @@ -8928,7 +8927,6 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) DECL_NAME (DECL_ARGUMENTS (fco)) = get_identifier ("__closure"); if (template_param_list) { - pop_deferring_access_checks (); fco = finish_member_template_decl (fco); finish_template_decl (template_param_list); --parser->num_template_parameter_lists; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6e209f8..a7baaba 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -21025,7 +21025,7 @@ is_auto (const_tree type) } /* Returns the first tree within T that is directly matched by PRED. T may be a - type or PARM_DECL and is incrementally decomposed toward it's type-specifier + type or PARM_DECL and is incrementally decomposed toward its type-specifier until a match is found. NULL_TREE is returned if PRED does not match any part of T. @@ -21341,7 +21341,7 @@ add_implicit_template_parms (size_t count, tree parameters) template has no explicit template parameter list so has not been through the normal template head and tail processing. add_implicit_template_parms tries to do the head; this tries to do the tail. MEMBER_DECL_OPT should be - provided if the declaration is a class member such that it's template + provided if the declaration is a class member such that its template declaration can be completed. If MEMBER_DECL_OPT is provided the finished form is returned. Otherwise NULL_TREE is returned. */ -- 1.8.3