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


    Well I totaly missed the one virtual method which added the vtable entry
about 10 times, mostly since the windows compile of the project was
returning 8 (aparently the intel compiler was optimizing it out totaly since
it was never referenced in a virtual manner and was inlined completely).  I
hadn't compiled debug in windows in ages, since the code has been working
there over a week (and was delayed a week on the linux side due to a 3rd
party library needing some fixes).


----- Original Message -----
From: "Horst von Brand" <vonbrand@inf.utfsm.cl>
To: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
Cc: <sean@dimensionalrift.com>; <gcc@gcc.gnu.org>
Sent: Friday, May 05, 2000 3:40 PM
Subject: 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]