aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-02-24 07:43:23 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-02-24 07:43:23 +0000
commitca099ac8c57c9858373cf83befdfae7bab8e4a4e (patch)
tree85612b52e4377cb1291b4fccdef603a8f787b9cb /gcc/cp/parser.c
parent463f02cd037fbf3af66cdbfff526fcb48d2ba746 (diff)
downloadgcc-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.c6
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]