[Bug c++/19604] vtable error with virtual inheritance and arrays

webmyster at addoc dot u-psud dot fr gcc-bugzilla@gcc.gnu.org
Mon Jan 24 14:53:00 GMT 2005


------- Additional Comments From webmyster at addoc dot u-psud dot fr  2005-01-24 14:53 -------
(In reply to comment #2)
> I think this is invalid and here is why?
> Basically the sizeof (A) is smaller than sizeof(B).
> But if you convert from B* to A* you cannot access the second element any more.

I'm agree it's not a conventional use of inheritance and tables. But it may be
valid.
Where could I find the C++ specifications used to implement g++, to get a valid
solution to my problem ?

Moreover, I would like to have a warning during the compilation. I think the
compiler can warning on each call of non first element of a table of classes
containing vtable.

-- 


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



More information about the Gcc-bugs mailing list