This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sizeof with virtual inheritance


Hello,
I would like to know why the size of class objects grows when virtual
inheritance is involved. I suppose the compiler adds some extra pointers to
them; I would like to know what they are for and why they are necessary, and if
it's possible to avoid them (or use at most one extra pointer).
I googled for this a bit, and I found an answer which suggests the use of an
attribute called "onevtable", but I can't find any other reference about it.
I'm using gcc 3.2 (I know, I know..) on Windows (mingw). I could switch to gcc
3.3.x if necessary.

Thanks
Adrian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]