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

Re: Long double alignment test



Brett Cundal wrote:

> I'm maintaining GNU Smalltalk, which is having problems building on
> most 64-bit platforms. I'm having difficulty tracking these problems
> down, so I'm asking for some assistance from anyone who has access to
> these platforms (any DD, I believe).
> <snip>
Anyone know if this works? Could someone please run this on each of
the archs we support (particularly ia64) and report the results to me?


Here's another 64-bit arch to compare to, I was curious about the
answer myself.

lukewarm@moltar:~/tmp$ uname -a
Linux moltar 2.4.26-sparc64 #1 Sat Apr 24 01:43:10 EDT 2004 sparc64 GNU/Linux

lukewarm@moltar:~/tmp$ ./longalign   # your code
sizeof(foo)=16
sizeof(align)=8
sizeof(f2)=32
union may be aligned on 8 byte boundaries.

lukewarm@moltar:~/tmp$ ./longalign2  # Neil's code
char: 1
short: 2
int: 4
long: 4
long long: 8
void*: 4
float: 4
double: 8
long double: 8

- David A. Riggs <riggs at csee dot wvu dot edu>



Reply to: