www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/23/16:03:41

Sender: nate AT cartsys DOT com
Message-ID: <37485FA6.645006F8@cartsys.com>
Date: Sun, 23 May 1999 13:05:58 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: problem with extended inline asm
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990518135146 DOT 24330X-100000 AT is> <3743B4E7 DOT 12663C12 AT go DOT ro> <374730AF DOT 831BEA33 AT cartsys DOT com> <374547CD DOT CEAAE0D3 AT go DOT ro>
Reply-To: djgpp AT delorie DOT com

Radu Georgescu aka skoola wrote:
> 
>  > if both a and b are automatic variables, you may also do this stuff but there
> 
> > > should be -2+%0 instead 2+%0 ,IMHO
> >
> > NO. This may work now but you CANNOT depend on it.  The compiler is at
> > liberty to place variables wherever it wants.  There is absolutely
> > nothing requiring it to put variables declared together adjacent to each
> > other.
> 
> ok, but what if you will group them in a struct?

Then they should be adjacent, yes.  (However, this is because of
tradition and ABI's rather than requirements of the C language; it may
not apply on all platforms.  You also have to consider alignment
constraints that may put a space in between.)
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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