This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Alpha vs. new ABI
On Jan 30, 2001, Jeff Sturm <jeff.sturm@appnet.com> wrote:
> Per Bothner wrote:
>> Would it work to add a dummy field:
>>
>> jdouble dummy[0];
>>
>> before the data field?
> Probably. I first tried "jint pad;" which gave the right answer. But
> it seems that jdouble alignment is wrong for 32-bit hosts. How about:
> jobject dummy[0];
jobject isn't correct either for a platform that has 32-bits pointers
but 64-bit doubles that must be 64-bit aligned.
I think the correct solution is:
union { jobject align_object; jdouble align_double; jlong align_long;
T data; } data[0];
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me