diff --git a/elab_type.cc b/elab_type.cc index 41ffa13a7..072d1e723 100644 --- a/elab_type.cc +++ b/elab_type.cc @@ -215,9 +215,9 @@ netstruct_t* struct_type_t::elaborate_type_raw(Design*des, NetScope*scope) const // There may be several names that are the same type: // name1, name2, ...; // Process all the member, and give them a type. - for (list::iterator name = curp->names->begin() - ; name != curp->names->end() ; ++ name) { - decl_assignment_t*namep = *name; + for (list::iterator cur_name = curp->names->begin() + ; cur_name != curp->names->end() ; ++ cur_name) { + decl_assignment_t*namep = *cur_name; netstruct_t::member_t memb; memb.name = namep->name; diff --git a/pform.cc b/pform.cc index 0632729ec..38ce6c3d9 100644 --- a/pform.cc +++ b/pform.cc @@ -867,6 +867,7 @@ void pform_set_typedef(perm_string name, data_type_t*data_type, std::listname = name; if (enum_type_t*enum_type = dynamic_cast(data_type)) pform_put_enum_type_in_scope(enum_type); diff --git a/pform_types.h b/pform_types.h index a7aaaad13..e961369b9 100644 --- a/pform_types.h +++ b/pform_types.h @@ -151,6 +151,8 @@ class data_type_t : public PNamedItem { virtual SymbolType symbol_type() const; + perm_string name; + private: // Elaborate the type to an ivl_type_s type. virtual ivl_type_s* elaborate_type_raw(Design*des, NetScope*scope) const; @@ -299,14 +301,11 @@ struct string_type_t : public data_type_t { struct class_type_t : public data_type_t { inline explicit class_type_t(perm_string n) - : name(n), base_type(0), save_elaborated_type(0) { } + : base_type(0), save_elaborated_type(0) { name = n; } void pform_dump(std::ostream&out, unsigned indent) const; void pform_dump_init(std::ostream&out, unsigned indent) const; - // This is the name of the class type. - perm_string name; - // This is the named type that is supposed to be the base // class that we are extending. This is nil if there is no // hierarchy. If there are arguments to the base class, then