From: "Anthony.Appleyard" Organization: Materials Science Centre To: djgpp AT delorie DOT com Date: Tue, 8 Apr 1997 14:12:51 GMT-1 Subject: Re: Problem with Packed structs Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk Message-ID: <6604EA689A@fs2.mt.umist.ac.uk> On Mon, 7 Apr 1997, Mark T Logan wrote: > I have a slight problem with the way that DJGPP packs its structs. ... "Adrian Gh. Oboroc aka AsH / DEVOTiON" wrote:- > You might want to use '#pragma pack' method: > > #pragma pack(1) > struct Heroin ////// Lets keep this stuff out of it!!!!!!! > { > char dealer[100]; > int quality; > double weight; > } > #pragma pack() > > but guys from FSF, who develops GCC, don't like pragmas, thus you'll get > some warnings at compilation stage. and thus you likely won't get any packing effect either. I put #define pk __attribute__((packed)) at the start of my programs, so it is easy to put `pk' before every `;' inside the struct {brackets}.