This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: static alignment and hash sync


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]