Commit c67d36d0 by Nathan Sidwell Committed by Nathan Sidwell

parser.c (cp_parser_type_parameter): Reformat.

	* parser.c (cp_parser_type_parameter): Reformat.
	(cp_parser_parameter_declaration): Deprecate default args where
	not allowed.

From-SVN: r69852
parent cc33095c
2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_parser_type_parameter): Reformat.
(cp_parser_parameter_declaration): Deprecate default args where
not allowed.
2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
* cfns.h: Rebuilt.
......
......@@ -7305,8 +7305,7 @@ cp_parser_type_parameter (cp_parser* parser)
/* Create the combined representation of the parameter and the
default argument. */
parameter = build_tree_list (default_argument,
parameter);
parameter = build_tree_list (default_argument, parameter);
}
break;
......@@ -7365,8 +7364,7 @@ cp_parser_type_parameter (cp_parser* parser)
/* Create the combined representation of the parameter and the
default argument. */
parameter = build_tree_list (default_argument,
parameter);
parameter = build_tree_list (default_argument, parameter);
}
break;
......@@ -10498,9 +10496,13 @@ cp_parser_parameter_declaration (cp_parser *parser,
}
if (!parser->default_arg_ok_p)
{
pedwarn ("default arguments are only permitted on functions");
if (flag_pedantic_errors)
default_argument = NULL_TREE;
if (!flag_pedantic_errors)
warning ("deprecated use of default argument for parameter of non-function");
else
{
error ("default arguments are only permitted for function parameters");
default_argument = NULL_TREE;
}
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment