Re: Why auto variables NOT overlap on stack?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 February 2010 21:02, Ding Curie <ding.curie@xxxxxxxxx> wrote:
>
> output:
>> p1 - p2 = 1024
>
> (Optimize or not makes no difference.)
>

Subtraction between pointers to different arrays is undefined, iirc,
so any result is legal.  It's possible, for instance, that the 1024 is
determined in one stage, and coalescing happens later.

Have you checked the assembly to see what actually happens?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux