search.c (dependent_base_p): Don't compare a binfo to current_class_type; use the TREE_TYPE of the binfo instead.
* search.c (dependent_base_p): Don't compare a binfo to current_class_type; use the TREE_TYPE of the binfo instead. From-SVN: r21971
This commit is contained in:
parent
226c39d390
commit
bca9e8f7cc
3 changed files with 28 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
* cp-tree.h (CLASS_TYPE_P): Revise definition.
|
||||
|
||||
1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
|
|
@ -3488,7 +3488,7 @@ dependent_base_p (binfo)
|
|||
{
|
||||
for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo))
|
||||
{
|
||||
if (binfo == current_class_type)
|
||||
if (TREE_TYPE (binfo) == current_class_type)
|
||||
break;
|
||||
if (uses_template_parms (TREE_TYPE (binfo)))
|
||||
return 1;
|
||||
|
|
24
gcc/testsuite/g++.old-deja/g++.pt/lookup4.C
Normal file
24
gcc/testsuite/g++.old-deja/g++.pt/lookup4.C
Normal file
|
@ -0,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);
|
||||
}
|
Loading…
Add table
Reference in a new issue