This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/4861
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, aaw at rincewind dot tv, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Subject: Re: c++/4861
- From: "Aloysius A. Wild III" <aaw at rincewind dot tv>
- Date: Mon, 12 Nov 2001 14:30:58 -0800
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4861&database=gcc
I've attached an un-preprocessed source file. Note that this problem
exists in both 3.0.2 and the current 3.1 snapshot.
Ollie
#include <iostream>
template<class C> class B {
public:
~B()
{
std::cerr << "Running B::~B()" << std::endl;
f();
}
virtual void f()
{
std::cerr << "Running B::f()" << std::endl;
}
};
class D : public B<int> {
public:
~D()
{
std::cerr << "Running D::~D()" << std::endl;
f();
}
virtual void f()
{
std::cerr << "Running D::f()" << std::endl;
}
};
int main(int argc, char **argv)
{
D d;
return 0;
}