------- Comment #12 from bangerth at math dot tamu dot edu  2008-04-02 13:31 
-------
Subject: Re:  Pure virtual method body omitted from template


> No, it is not. And that's because this pure virtual method never gets called
> explicitly.

The point I meant to make but failed is: a pure virtual method can *only* 
*ever* be called explicitly. It can't be called through the vtable because 
there can be no objects of the type of this pure class, only of derived 
classes, and in the vtables of this derived class the slot for this 
virtual function is filled by another function (because the derived class, 
to be instantiated, must have overwritten the pure function).

So, yes, I'm not surprised that the object file you produce from your 
testcase doesn't contain pvMethod. But that's not a problem because in it 
nobody ever calls this function. What I want to see is a testcase in which 
this function *should* be there because it is, somehow, called or 
otherwise required.

Does this make sense?

W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [EMAIL PROTECTED]
                                 www: http://www.math.tamu.edu/~bangerth/


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33878

Reply via email to