lua-users home
lua-l archive

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


Sorry. I have been having lots of email problems, on top of everything else.

I'll whine at my email provider again next week.

I'm really sorry I missed the workshop. But I will come and visit sometime :)

R.

By the way, I don't think MS VC aligns doubles to doublewords by default, otherwise Glenn wouldn't have that problem. (Unless the fact that it's in a union somehow defeats the default, which would be really wierd.) That page you pointed to helpfully says that it depends on the /Zp option, but doesn't seem to hint at what the default might be (aside from suggesting that you don't change it.) gcc indeed does use 4-byte alignment (although you can tell it to use 8 byte) because that's what the x86 ABI defines.

On 25-Sep-06, at 12:38 AM, Wim Couwenberg wrote:


I'm also not sure if VC has an equivalent to attribute(aligned).

You can use __declspec(align(16)).  See:

    http://msdn2.microsoft.com/en-us/library/83ythb65.aspx

On a 32 bit architecture both Borland and Microsoft compilers use a default 8 byte alignment for doubles. (I think this differs from gcc besed compilers that seem to use 4 byte alignment?) You can use the __alignof operator to get the alignment of a type at runtime.


    http://msdn2.microsoft.com/en-us/library/45t0s5f4.aspx

--
Wim

P.S.: Rici, I suspect you missed a mail or two from me. At least I didn't get a response. (I invited you to the workshop a/o.)