www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/10/17:01:44

Date: Mon, 09 Dec 1996 09:54:15 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: Padding Question
To: Erik Max Francis <max AT alcyone DOT com>
Cc: djgpp AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <32ABE1C7.1837@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <32A810D9 DOT 366E9B4E AT m-net DOT arbornet DOT org> <32A85B15 DOT 4015 AT skygames DOT com>
<32A8F16C DOT 596F AT cs DOT com> <32A91EFF DOT 6C6FD6F0 AT alcyone DOT com> <32A9CD2C DOT 6BAE AT cs DOT com>
<32A9EE30 DOT 7A212C19 AT alcyone DOT com>

Erik Max Francis wrote:
> But that was my whole point.  If you're counting on packed structures, you
> have to do something compiler-specific to get them -- in DJGPP, that's
> either with a #pragma or an attribute.  Considering that they are _both_
> inherently nonportable, and in both cases you know the conditions which
> they will be usable, I don't see why the one is any better than the other.
> Ultimately it comes down to the fact that both alternatives are
> nonportable.

Ahh, but most compilers will silently ignore unrecognized #prama's (or
only 
give a mild warning).  However, if you use __attribute__ constructs
instead 
(useful for more than just packing), other compilers will spit the dummy
and
complain about syntax/parsing errors etc and this will make porting
EASIER 
because your attention is brought to the problem immediatly by the
compiler 
rather than later on when your once working code stops working when
ported.

Bill
-- 
Leave others their otherness.

- Raw text -


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