Problem with structure alignment on MPC

Bill Gatliff bgat@billgatliff.com
Wed May 7 15:32:00 GMT 2003


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



More information about the crossgcc mailing list