struct field alignment

Denis Koroskin 2korden at gmail.com
Sun Oct 17 19:48:41 PDT 2010


On Mon, 18 Oct 2010 06:22:32 +0400, BCS <none at anon.com> wrote:

> Hello Denis,
>
>> On some platforms it is desired to align struct Vec { float[4] data; }
>> on  16 bytes.
>
> At a guess, that is aligning the structure in memory, not the members in  
> the struct. I think the 2nd is the question here.
>

Yes, I was talking about stack alignment.

>> Bikeshed note: how about align(C) to be consistent with both align(1)
>> and  extern(C)?
>>
>
> vote++;
>
>

align(default) could also work.


More information about the Digitalmars-d mailing list