This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 2.95.2 calculates wrong size for class
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>,"Horst von Brand" <vonbrand at inf dot utfsm dot cl>
- Subject: Re: g++ 2.95.2 calculates wrong size for class
- From: "Sean Cavanaugh" <sean at dimensionalrift dot com>
- Date: Fri, 5 May 2000 15:51:26 -0700
- Cc: <gcc at gcc dot gnu dot org>
- References: <200005052240.e45MeB825372@pincoya.inf.utfsm.cl>
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
>