@@ -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. */
@@ -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;
}
@@ -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);
@@ -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;
@@ -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. */