This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ALIGNOF


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]