[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] struct align



Miro Kropacek píše v Ne 11. 01. 2009 v 16:27 +0100:
> You see -- the 3rd member is put xxxxxC address (i.e. divisible by 4),
> fine. But now, on both atari compilers is then 'long' member aligned
> on 2 bytes (xxxxE, which is 14 for x = 0, i.e. divisible only by 2)
> what I find wrong since it should work according to the data type
> (char = aligned on 1 byte boundary, short = 2 bytes, long = 4

I very much doubt that aligning should be on sizeof(datatype). I'd guess
that aligning is based on data bus size and old ST was 16-bit thus long
is word aligned on atari.

Petr