CNI changes (Was: Binary Compatibility)
Tom Tromey
tromey@redhat.com
Mon Aug 4 15:22:00 GMT 2003
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> Well, I guess it does save memory. However, the last time I looked
Andrew> there was some fairly nasty hacking in the C++ front end to make this
Andrew> work. I'll ask Jason if we can have thaht code in a common place.
We could try to approach the problem in a different way. C++, as I
understand it, just builds subclasses that look like:
struct subclass {
char padding[sizeof(superclass)];
my fields;
}
That's pretty ugly. When I looked into this (last time we talked
about it), I thought that stor-layout.c:finalize_type_size() was
rounding up each class' size, and that if we added a new hook to let
us skip this, we would be ok. I never tested this theory though.
Maybe it isn't that easy; stuff in gcc rarely is.
Tom
More information about the Java
mailing list