This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: On alignment


On Tue, 25 Mar 2003 13:44:59 -0500, "Kevin B. Hendricks" <kevin dot hendricks at sympatico dot ca> wrote:

> Also, this is why Darwin gcc3 alignment (and AIX it seems from David))
> which has double aligned to 4 and long long int aligned to 8 throws off
> some of the OOo alignment tricks as well.

Well, that's wacky.  Yes, that would cause trouble, as the assumption that
a double field already has maximum field alignment is no longer valid.  So
with a testcase like

struct A {
  A();
  long long i;
  double d;
};

struct B:A {
  double bd;
};

you would need the alignment hack to increase the alignment of bd to 8.
But if A doesn't have alignment of 8, applying the alignment hack would
incorrectly increase the alignment of bd (because of the bug).  OK, I think
we really need to fix this for 3.3.

Jason


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