cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
authorMark Mitchell <mark@markmitchell.com>
Thu, 6 Aug 1998 16:58:43 +0000 (16:58 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 6 Aug 1998 16:58:43 +0000 (16:58 +0000)
commited44da020e182d3eee3610fe8e5eacb9518f9848
treeb355abe185dd73456bde7f2fa6e7439b5e0ad9a2
parenta8b0896fe66c3ef592d99d3a2f02eb2d986eb2b1
cp-tree.h (ENUM_TEMPLATE_INFO): New macro.

* cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
(TYPE_TEMPLATE_INFO): Likewise.
(SET_TYPE_TEMPLATE_INFO): Likewise.
(ENUM_TI_TEMPLATE): Likewise.
(ENUM_TI_ARGS): Likewise.
(lookup_nested_type_by_name): Remove.
* decl.c (maybe_process_template_type_declaration): Handle enums.
(start_enum): Don't check for primary-template enum declarations
here.
(finish_enum): Clean up, document.  Make sure template enum
constants get the correct type.
(build_enumerator): Copy initializers for template enumerations,
too.
(grok_enum_decls): Document.
* lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
better.  Build LOOKUP_EXPRs for local variables, even if they are
TREE_PERMANENT.
* pt.c (tsubst_enum): Remove field_chain parameter.
(template_class_depth): Include the depth of surrounding function
contexts.
(push_template_decl): Check for primary-template enum declarations
here.  Deal with enumeration templates.
(lookup_template_class): Likewise.
(for_each_template_parm): Likewise.
(instantiate_class_template): Don't call tsubst_enum directly,
call tsubst instead, to instantiate enums.  Deal with all
field_chain issues here, not in tsubst_enum.
(lookup_nested_type_by_name): Remove.
(tsubst_aggr_type): Revise handling of enumeration types.
(tsubst): Likewise.
(tsubst_copy): Likewise.
(tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.

From-SVN: r21622
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/lex.c
gcc/cp/pt.c
gcc/testsuite/g++.old-deja/g++.pt/crash19.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/enum6.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/enum7.C [new file with mode: 0644]