diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-02-24 07:43:23 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-02-24 07:43:23 +0000 |
commit | ca099ac8c57c9858373cf83befdfae7bab8e4a4e (patch) | |
tree | 85612b52e4377cb1291b4fccdef603a8f787b9cb /gcc/cp/parser.c | |
parent | 463f02cd037fbf3af66cdbfff526fcb48d2ba746 (diff) | |
download | gcc-ca099ac8c57c9858373cf83befdfae7bab8e4a4e.zip gcc-ca099ac8c57c9858373cf83befdfae7bab8e4a4e.tar.gz gcc-ca099ac8c57c9858373cf83befdfae7bab8e4a4e.tar.bz2 |
re PR c++/5333 (ICE on nested template classes using other nested template classes)
PR c++/5333
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
* parser.c (cp_parser_diagnose_invalid_type_name): Use it.
* pt.c (instantiate_class_template): Don't try to instantiate
dependent types.
(resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
PR c++/5333
* g++.dg/parse/fused-params1.C: Adjust error messages.
* g++.dg/template/nested3.C: New test.
From-SVN: r63354
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 79ec8be..0688cdc 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1954,10 +1954,7 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser) template (which will have an empty TYPE_FIELDs), to the main version. */ if (CLASSTYPE_USE_TEMPLATE (base_type)) - base_type = (TREE_TYPE - (DECL_TEMPLATE_RESULT - (DECL_PRIMARY_TEMPLATE - (CLASSTYPE_TI_TEMPLATE (base_type))))); + base_type = CLASSTYPE_PRIMARY_TEMPLATE_TYPE (base_type); for (field = TYPE_FIELDS (base_type); field; field = TREE_CHAIN (field)) @@ -4526,6 +4523,7 @@ cp_parser_unary_operator (cp_token* token) /* Parse a new-expression. + new-expression: :: [opt] new new-placement [opt] new-type-id new-initializer [opt] :: [opt] new new-placement [opt] ( type-id ) new-initializer [opt] |