This is the mail archive of the gcc@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]

Re: g++ 2.95.2 calculates wrong size for class


"Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> said:

[...]

> If you need a structure to exactly match the layout of C, it must not
> have virtual methods, base classes, access declarations
> (private/protected), and some other stuff.

Virtual methods I understand why not (vtable for virtual methods), also
virtual bases would be out. But I don't understand why not access
declarations, or bases (sure, can get hairy to grasp the exact layout, but
it should be like a struct with another inside, isn't it?)

Just curiosity, sorry.
-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

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