Message-ID: <32A85B15.4015@skygames.com> Date: Fri, 06 Dec 1996 09:42:45 -0800 From: Kevin Baca Organization: BlueSky Software MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Padding Question References: <32A810D9 DOT 366E9B4E AT m-net DOT arbornet DOT org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Rohit Jalan wrote: > > Hi !! > > Is it possible to stop gcc from padding structures ? > > Thnx. > Rohit > #pragma pack(1) /* use one byte as minimum packing size */ struct foo { int i; char c; int j; }; #pragma pack(2) /* use two bytes as minimum packing size */ struct bar { int k; char d; int x; }; #pragma pack() /* use default packing */ -Kevin