[Bug c++/50243] vtable for pure abstract class (interface) shouldn't be emitted

congruwer at yahoo dot co.uk gcc-bugzilla@gcc.gnu.org
Wed Aug 31 15:44:00 GMT 2011


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

--- Comment #2 from congruwer at yahoo dot co.uk 2011-08-31 15:27:52 UTC ---
Not in this case. The example is set up such that the vtable is invisible, even
if it is emitted. Since no one can access it, it cannot be required. (I have
searched through the ABI documentation again, and it doesn't seem to require
the presence of unreferenced vtables. And if it did, that would be a logical
contradiction.)
There is, in principle, an absolute guarantee that the fields of iface's vtable
will never get accessed, and that ___cxa_pure_virtual will never get called, or
at least not through iface's vtable.



More information about the Gcc-bugs mailing list