static alignment and hash sync

Andrew Haley aph@cambridge.redhat.com
Fri Jun 8 10:08:00 GMT 2001


Tony Kimball writes:
 > Quoth Andrew Haley on Friday, 8 June:
 > : It's importsant to use __attribute__((aligned)) correctly on a type.
 > : This program demonstrates the correct and incorrect use of aligned
 > : better than I can explain.
 > 
 > Thanks much!  It also explains why the declaration did not have the
 > effect I desired.  When I run it, only d is aligned(8)!
 > Is it possible to align a variable of a closed type?

I may be wrong, but AFAICR alignment is a type attribute, and
__attribute__((aligned)) when applied to a decl doesn't create a new
type.  For clarity and compatibility it's best to create a new aligned
type via a typedef and use that.

Andrew.



More information about the Java mailing list