This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: ALIGNOF
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 13 Apr 2004 10:46:21 -0600
- Subject: Re: ALIGNOF
- References: <200404131618.i3DGIYwY025994@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> It turns out that libgcj aligns things differently from the
Andrew> compiler.
Ugh, after all the stuff we went through last time, you'd think this
bug could stay dead.
Andrew> struct aligner
Andrew> {
Andrew> + char c;
Andrew> T field;
Andrew> };
Andrew> ! #define ALIGNOF(TYPE) (offsetof (aligner<TYPE>, field))
Hmm, the old code gets the wrong answer for `double'. And that was
explicitly mentioned in the thread last year. You'd think I would
have noticed it then.
We really need tests in this area.
Tom