diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-02-24 21:52:00 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-02-24 21:52:00 +0000 |
commit | 353b4fc0d72bbbf8a7b975d4d1e9cc6e036f458a (patch) | |
tree | aea7c328c45ca231ae6c3de7a76a3787a6f4bbc4 /gcc/cp/parser.c | |
parent | 2afced11918b76955f3262608cb4c5f66350fcdc (diff) | |
download | gcc-353b4fc0d72bbbf8a7b975d4d1e9cc6e036f458a.zip gcc-353b4fc0d72bbbf8a7b975d4d1e9cc6e036f458a.tar.gz gcc-353b4fc0d72bbbf8a7b975d4d1e9cc6e036f458a.tar.bz2 |
re PR c++/9836 (Error with typdefs in partial specializations of classes)
PR c++/9836
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
specializations back to the main template.
* parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
* pt.c (resolve_typename_type): Likewise.
PR c++/9836
* g++.dg/template/spec6.C: New test.
From-SVN: r63383
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 0688cdc..17b7224 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1953,8 +1953,7 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser) /* Go from a particular instantiation of the template (which will have an empty TYPE_FIELDs), to the main version. */ - if (CLASSTYPE_USE_TEMPLATE (base_type)) - base_type = CLASSTYPE_PRIMARY_TEMPLATE_TYPE (base_type); + base_type = CLASSTYPE_PRIMARY_TEMPLATE_TYPE (base_type); for (field = TYPE_FIELDS (base_type); field; field = TREE_CHAIN (field)) |