[Bug c++/19604] vtable error with virtual inheritance and arrays
--- Additional Comments From bangerth at dealii dot org 2005-01-26 04:25 --- You are accessing something here var[1].adresse() that definitely is not an A, but sitting somewhere between other objects. That's definitely not allowed. W. -- What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19604
[Bug c++/19604] vtable error with virtual inheritance and arrays
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-24 14:37 --- 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. -- What|Removed |Added Summary|vtable error with virtual |vtable error with virtual |inheritance and tables |inheritance and arrays http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19604
[Bug c++/19604] vtable error with virtual inheritance and arrays
--- 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