Date: Mon, 13 May 1996 08:43:00 +0200 (IST) From: Eli Zaretskii To: j DOT aldrich6 AT genie DOT com Cc: djgpp AT delorie DOT com Subject: Re: more sizeof questions In-Reply-To: <199605122216.AA124429376@relay1.geis.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 12 May 1996 j DOT aldrich6 AT genie DOT com wrote: > Actually, I was wondering about that... is there a specific define I can > check to find out if a given compiler pads structs, or would I have to > test for each individual compiler? You should assume that every compiler pads structs. Most of them do. > Also, according to the docs, > __attribute__ only works with later versions of gcc; is there any way > besides #pragma pack() to pack structs on other compilers? The way you tell the compiler to pack structs is inherently compiler-dependent. AFAIK, there is no standard on how this is done, so you must address every supported compiler in the way it understands.