This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
c++ vtable lossage
- To: egcs-bugs at cygnus dot com, egcs at cygnus dot com
- Subject: c++ vtable lossage
- From: Richard Henderson <rth at twiddle dot rth dot home>
- Date: Sat, 27 Jun 1998 18:45:42 -0700
- Reply-To: Richard Henderson <rth at cygnus dot com>
[ Target alpha-linux-gnu ]
Somewhere recently something changed such that c++ vtables are not
output as constant data, but rather constructed at run time. Which
seems wasteful, but I'm fully prepared to belive that it is some
random side effect from lossage elsewhere.
What brought it to my attention was that it was wanting addresses
for pure virtual functions, which of course fails at link time.
Test case appended.
r~
struct A
{
virtual void x() = 0;
};
struct B : public A
{
B();
virtual void x();
};
B::B() { }
void B::x() { }
main()
{
B b;
}