I still don't understand the align attribute

Stewart Gordon smjg_1998 at yahoo.com
Thu Jun 17 12:45:45 PDT 2010

Trass3r wrote:
> http://digitalmars.com/d/2.0/attribute.html#align
> "align by itself sets it to the default, which matches the default 
> member alignment of the companion C compiler."
> OK!
> "align(Integer): Integer specifies the alignment which matches the 
> behavior of the companion C compiler when non-default alignments are used"
> I don't really understand that sentence.

Basically, it means that the member is aligned on n-byte boundaries in 
whatever way the companion C compiler does if instructed to.

However, there's no statement I can find of what's supposed to happen if 
the companion C compiler doesn't support alignment control at the level 
where it is used.

(marked as fixed, but it seems it isn't really)


More information about the Digitalmars-d-learn mailing list