re PR c++/13166 ([DR136] not implemented)
PR c++/13166 * parser.c (cp_parser_late_parsing_default_args): Make sure the context is a class before calling push_nested_class and pop_nested_class. * g++.dg/parse/defarg6.C: New test. From-SVN: r74333
This commit is contained in:
parent
2a67ff5e9e
commit
f128e1f332
|
@ -1,3 +1,10 @@
|
|||
2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/13166
|
||||
* parser.c (cp_parser_late_parsing_default_args): Make sure the
|
||||
context is a class before calling push_nested_class and
|
||||
pop_nested_class.
|
||||
|
||||
2003-12-03 James E Wilson <wilson@specifixinc.com>
|
||||
|
||||
* g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
|
||||
|
|
|
@ -14239,10 +14239,10 @@ cp_parser_late_parsing_default_args (cp_parser *parser, tree fn)
|
|||
saved_local_variables_forbidden_p = parser->local_variables_forbidden_p;
|
||||
parser->local_variables_forbidden_p = true;
|
||||
/* Parse the assignment-expression. */
|
||||
if (DECL_CONTEXT (fn))
|
||||
if (DECL_CLASS_SCOPE_P (fn))
|
||||
push_nested_class (DECL_CONTEXT (fn));
|
||||
TREE_PURPOSE (parameters) = cp_parser_assignment_expression (parser);
|
||||
if (DECL_CONTEXT (fn))
|
||||
if (DECL_CLASS_SCOPE_P (fn))
|
||||
pop_nested_class ();
|
||||
|
||||
/* Restore saved state. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/13166
|
||||
* g++.dg/parse/defarg6.C: New test.
|
||||
|
||||
2003-12-05 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
PR target/13256
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
// { dg-do compile }
|
||||
|
||||
// Origin: Falk Hueffner <falk@debian.org>
|
||||
|
||||
// PR c++/13166: ICE default function argument for friend declaration.
|
||||
|
||||
namespace sc_dt {
|
||||
class sc_length_param {
|
||||
friend int compare_unsigned(int if_v_signed = 0) {}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue