PATCH for dependent_base_p

Mark Mitchell mark@markmitchell.com
Tue Aug 25 13:18:00 GMT 1998


This patch fixes a typo in dependent_base_p.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com

1998-08-25  Mark Mitchell  <mark@markmitchell.com>

	* search.c (dependent_base_p): Don't compare a binfo to
	current_class_type; use the TREE_TYPE of the binfo instead.

Index: testsuite/g++.old-deja/g++.pt/lookup4.C
===================================================================
RCS file: lookup4.C
diff -N lookup4.C
*** /dev/null	Mon Dec 31 20:00:00 1979
--- lookup4.C	Tue Aug 25 12:41:50 1998
***************
*** 0 ****
--- 1,24 ----
+ // Build don't link:
+ 
+ void h(int);
+ 
+ template <class T>
+ class i {};
+ 
+ struct B
+ {
+   int i;
+ };
+ 
+ template <class T>
+ struct D : public B
+ {
+   void f();
+   void g() { h(i); }
+ };
+ 
+ template <class T>
+ void D<T>::f()
+ {
+   h(i);
+ }
Index: cp/search.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/search.c,v
retrieving revision 1.41
diff -c -p -r1.41 search.c
*** search.c	1998/08/24 02:05:51	1.41
--- search.c	1998/08/25 19:42:02
*************** dependent_base_p (binfo)
*** 3488,3494 ****
  {
    for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo))
      {
!       if (binfo == current_class_type)
  	break;
        if (uses_template_parms (TREE_TYPE (binfo)))
  	return 1;
--- 3488,3494 ----
  {
    for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo))
      {
!       if (TREE_TYPE (binfo) == current_class_type)
  	break;
        if (uses_template_parms (TREE_TYPE (binfo)))
  	return 1;



More information about the Gcc-patches mailing list