[MLton] x86_64 port status

skaller skaller@users.sourceforge.net
Wed, 10 May 2006 10:20:14 +1000


On Tue, 2006-05-09 at 16:31 -0700, Stephen Weeks wrote:
> > Perhaps a better approach would be to define the following:
> > 
> >    struct PointerAux { unsigned char[4]; } __attribute__ ((aligned (4));
> >    typedef struct PointerAux* Pointer;
> 
> I tried this out and it worked well.  To be clear, I used
> 
>   struct PointerAux { unsigned char z[4]; } __attribute__ ((aligned (4)));

But this only works for gcc! Please use a union to align
data, it's portable to all compilers and architectures.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net