Mail Archives: djgpp/1999/05/23/16:03:41
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 -