www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/13/01:57:59

Date: Mon, 13 May 1996 08:43:00 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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: <Pine.SUN.3.91.960513084045.27468I-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019