This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: pr 5658
- From: Jason Merrill <jason at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Mar 2002 00:19:38 +0000
- Subject: Re: pr 5658
- References: <3C966550.13E2A6DC@codesourcery.com>
>>>>> "Nathan" == Nathan Sidwell <nathan@codesourcery.com> writes:
> 2001-11-15 Jason Merrill <jason@redhat.com>
> * decl.c (make_typename_type): Handle getting a class template.
> * search.c (lookup_field_r): A class template is good enough for
> want_type.
> seems to be breaking 5658, as add_binding sees the iterator TEMPLATE_DECL
> being pushed twice when instantiating. Thoughts?
I still think it makes sense to consider a class template to be a type for
the purposes of this artificial distinction. This untested patch fixes the
testcase for me:
*** search.c.~1~ Sun Mar 17 13:52:35 2002
--- search.c Tue Mar 19 00:17:52 2002
*************** setup_class_bindings (name, type_binding
*** 2435,2440 ****
--- 2435,2441 ----
if (type_binding_p
&& (TREE_CODE (value_binding) == TYPE_DECL
+ || DECL_CLASS_TEMPLATE_P (value_binding)
|| (TREE_CODE (value_binding) == TREE_LIST
&& TREE_TYPE (value_binding) == error_mark_node
&& (TREE_CODE (TREE_VALUE (value_binding))