align(16) struct member throws an exception with movdqa

Trass3r un at known.com
Thu Jun 14 05:01:58 PDT 2012


>> Cause align doesn't work the way you think it does.
>> In fact I still don't understand how it works at all.
>
> The language align keyword can only reduce the alignment from the  
> platform default (typically 8).  A serious flaw if you ask me . . . .

The doc page doesn't even clearly state this, it is incomprehensible imo:  
http://dlang.org/attribute.html#align

"align by itself sets it to the default, which matches the default member  
alignment of the companion C compiler. Integer specifies the alignment  
which matches the behavior of the companion C compiler when non-default  
alignments are used."
What the heck is this supposed to mean? It sounds like in any case the C  
compiler's value is used and the attribute is completely  
superfluous/useless.


More information about the Digitalmars-d-learn mailing list