diff options
author | Mark Mitchell <mmitchell@usa.net> | 1998-05-20 23:28:21 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1998-05-20 23:28:21 +0000 |
commit | 35acd3f28278072c4753f582ecdc1d49935b1d25 (patch) | |
tree | e68e5971c36459908cfeda440454fbae4b33f8b1 /gcc/cp/semantics.c | |
parent | 2a3edac9ad6f035784b1eeccfa6fc7d82248077f (diff) | |
download | gcc-35acd3f28278072c4753f582ecdc1d49935b1d25.zip gcc-35acd3f28278072c4753f582ecdc1d49935b1d25.tar.gz gcc-35acd3f28278072c4753f582ecdc1d49935b1d25.tar.bz2 |
class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P to look for type declarations.
* class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
to look for type declarations.
(finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
* cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
(finish_member_class_template): Declare.
* decl.c (pushtag): Put member class templates on the
CLASSTYPE_TAGS list, just as for ordinary member classes.
(pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
(lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
IDENTIFIER_NAMESPACE_VALUEs.
* parse.y (component_decl): Move code to ...
* semantics.c (finish_member_class_template): New function.
Don't put member class templates on the list of components for a
class.
* pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
In fact, don't use DECL_CONTEXT at all here.
From-SVN: r19918
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 2501642..4ee2de4 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1337,3 +1337,25 @@ begin_inline_definitions () /* Undo the begin_tree in begin_class_definition. */ end_tree (); } + +/* Finish processing the declaration of a member class template + TYPES whose template parameters are given by PARMS. */ + +tree +finish_member_class_template (parms, types) + tree parms; + tree types; +{ + note_list_got_semicolon (types); + grok_x_components (types, NULL_TREE); + if (TYPE_CONTEXT (TREE_VALUE (types)) != current_class_type) + /* The component was in fact a friend declaration. We avoid + finish_member_template_decl performing certain checks by + unsetting TYPES. */ + types = NULL_TREE; + finish_member_template_decl (parms, types); + /* As with other component type declarations, we do + not store the new DECL on the list of + component_decls. */ + return NULL_TREE; +} |