Commit efb169b0 by Nathan Sidwell Committed by Nathan Sidwell

parser.c (cp_parser_late_parsing_default_args): Fix overeager assert in previous patch.

cp:
	* parser.c (cp_parser_late_parsing_default_args): Fix overeager
	assert in previous patch.
testsuite:
	* g++.dg/parse/defarg10.C: New.

From-SVN: r100702
parent f8ed6473
2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_parser_late_parsing_default_args): Fix overeager
assert in previous patch.
2005-06-06 Jakub Jelinek <jakub@redhat.com>
* error.c (locate_error): Use gmsgid instead of msgid for argument
......
......@@ -15599,7 +15599,10 @@ cp_parser_late_parsing_default_args (cp_parser *parser, tree fn)
if (!default_arg)
continue;
gcc_assert (TREE_CODE (default_arg) == DEFAULT_ARG);
if (TREE_CODE (default_arg) != DEFAULT_ARG)
/* This can happen for a friend declaration for a function
already declared with default arguments. */
continue;
/* Push the saved tokens for the default argument onto the parser's
lexer stack. */
......
2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/parse/defarg10.C: New.
2005-06-06 Jakub Jelinek <jakub@redhat.com>
PR regression/21897
......
// Copyright (C) 2005 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 7 Jun 2005 <nathan@codesourcery.com>
// From java library.
void Foo (int = 0);
class Class
{
friend void Foo (int);
};
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