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
+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
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
--- /dev/null
+// 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);
+};