This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with structure alignment on MPC


Daniel:


Daniel Lidsten wrote:


...then all structures get 16bit aligned if i allocated them as an array
like this:

struct block test[10];

BUT, if i allocate them one by one:

struct block test1;
struct block test1;
struct block test1;

....then i get a structure alignment of 8byte


What happens if you do this? (I'd try myself, but my MPC compiler is down at the moment!):

struct block test1 __attribute__((aligned(2)));


Regards,


b.g.

--
Bill Gatliff
Professional embedded Linux training.
http://billgatliff.com



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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