aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-08-01 15:06:02 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-08-01 15:06:02 +0000
commitcbd63935d8cb0edec8d27a7c427106b41d85a29f (patch)
treecfa3a63f72156106d2f13838ea20b64ffacdbb1f /gcc/cp/parser.c
parentee3071efe506d022e4cad7d81354724c01e0f932 (diff)
downloadgcc-cbd63935d8cb0edec8d27a7c427106b41d85a29f.zip
gcc-cbd63935d8cb0edec8d27a7c427106b41d85a29f.tar.gz
gcc-cbd63935d8cb0edec8d27a7c427106b41d85a29f.tar.bz2
PR c++/8442, c++/8806
PR c++/8442, c++/8806 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are preferred. (check_elaborated_type_specifier): Add allow_template_p parameter. Check tag mismatch and class template. (xref_tag): Add template_header_p parameter. Add assertion that name is an IDENTIFIER_NODE. Remove implicit typename warning. Simplify lookup process if globalize is true. (cxx_init_decl_processing): Adjust call to xref_tag. (xref_tag_from_type): Likewise. * decl2.c (handle_class_head): Likewise. * parser.c (cp_parser_elaborated_type_specifier, cp_parser_class_head): Likewise. * rtti.c (init_rtti_processing, build_dynamic_cast1, tinfo_base_init, emit_support_tinfos): Likewise. * class.c (is_base_of_enclosing_class): Remove. * pt.c (convert_template_argument): Don't accept RECORD_TYPE as template template argument. * cp-tree.h (xref_tag): Adjust declaration. (is_base_of_enclosing_class): Remove. * NEWS: Document template template argument change. * g++.dg/template/elab1.C: Likewise. * g++.dg/template/type2.C: Likewise. * g++.dg/template/ttp3.C: Adjust expected error message. * g++.old-deja/g++.law/visibility13.C: Likewise. * g++.old-deja/g++.niklas/t135.C: Likewise. * g++.old-deja/g++.pt/ttp41.C: Likewise. * g++.old-deja/g++.pt/ttp43.C: Use qualified name for template template argument. * g++.old-deja/g++.pt/ttp44.C: Likewise. From-SVN: r70048
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 63c8172..fce69ca 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -8553,7 +8553,8 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
(is_friend
|| !is_declaration
|| cp_lexer_next_token_is_not (parser->lexer,
- CPP_SEMICOLON)));
+ CPP_SEMICOLON)),
+ parser->num_template_parameter_lists);
}
}
if (tag_type != enum_type)
@@ -11380,7 +11381,8 @@ cp_parser_class_head (cp_parser* parser,
/* If the class was unnamed, create a dummy name. */
if (!id)
id = make_anon_name ();
- type = xref_tag (class_key, id, attributes, /*globalize=*/0);
+ type = xref_tag (class_key, id, attributes, /*globalize=*/false,
+ parser->num_template_parameter_lists);
}
else
{