This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pr 5658


>>>>> "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))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]