From e13bced249143e8dfd439aad6072a8eee7dedc76 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 19 Jan 2001 09:27:34 +0000 Subject: [PATCH] class.c (duplicate_tag_error): Robustify flag clearing. cp: * class.c (duplicate_tag_error): Robustify flag clearing. From-SVN: r39130 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/class.c | 29 ++++++++++------------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 69e7473..b81617e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2001-01-19 Nathan Sidwell + * class.c (duplicate_tag_error): Robustify flag clearing. + +2001-01-19 Nathan Sidwell + * cp-tree.h (lookup_template_class): Add complain parm. * decl.c (lookup_namespace_name): Adjust call to lookup_template_class. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 888e8ae..423fb32 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -2375,25 +2375,16 @@ duplicate_tag_error (t) TYPE_CONTEXT (t) = NULL_TREE; TYPE_NONCOPIED_PARTS (t) = NULL_TREE; - TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) = 0; - TYPE_HAS_CONSTRUCTOR (t) = 0; - TYPE_HAS_DESTRUCTOR (t) = 0; - TYPE_HAS_CONVERSION (t) = 0; - TYPE_HAS_ASSIGN_REF (t) = 0; - TYPE_HAS_CONST_ASSIGN_REF (t) = 0; - TYPE_HAS_INIT_REF (t) = 0; - TYPE_HAS_CONST_INIT_REF (t) = 0; - TYPE_HAS_NEW_OPERATOR (t) = 0; - TYPE_HAS_ARRAY_NEW_OPERATOR (t) = 0; - TYPE_HAS_DEFAULT_CONSTRUCTOR (t) = 0; - CLASSTYPE_HAS_MUTABLE (t) = 0; - CLASSTYPE_NON_POD_P (t) = 0; - CLASSTYPE_NEARLY_EMPTY_P (t) = 0; - CLASSTYPE_NON_AGGREGATE (t) = 0; - TYPE_HAS_REAL_ASSIGN_REF (t) = 0; - TYPE_HAS_COMPLEX_ASSIGN_REF (t) = 0; - TYPE_HAS_ABSTRACT_ASSIGN_REF (t) = 0; - TYPE_HAS_COMPLEX_INIT_REF (t) = 0; + /* Clear TYPE_LANG_FLAGS -- those in TYPE_LANG_SPECIFIC are cleared above. */ + TYPE_LANG_FLAG_0 (t) = 0; + TYPE_LANG_FLAG_1 (t) = 0; + TYPE_LANG_FLAG_2 (t) = 0; + TYPE_LANG_FLAG_3 (t) = 0; + TYPE_LANG_FLAG_4 (t) = 0; + TYPE_LANG_FLAG_5 (t) = 0; + TYPE_LANG_FLAG_6 (t) = 0; + /* But not this one. */ + SET_IS_AGGR_TYPE (t, 1); } /* Make the BINFO's vtablehave N entries, including RTTI entries, -- 2.7.4