In a similar situation I use: #pragma pack (2) ... Structures, etc #pragma pack () and this work (align at word boundaries) Regards Angel Sanchez --- In lpc2000@yahoogroups.com, "nourson54" <nourson54@y...> wrote: > Hello, > > I'm trying a fat16 library that use an union for storing the > bootsector data, and it seems the compiler doesn't handle correctly > the width of types in memory. > So I searched some help on crossworks (gcc) compiler and found that I > have to use this attribute with my concerned unions : > __attribute__ ((__packed__)) > > But if the compiler doesn't shout at me when compiling , it seems it > has no effect : my union is badly aligned. > > Have any idea ?
Message
Re: Struct/Union alignement problem with Crossworks
2005-09-20 by Angel Sanchez