why the difference of two global pointers is not a constant?

Mike Stump mrs@apple.com
Tue Jul 25 17:56:00 GMT 2006


On Jul 25, 2006, at 5:00 AM, Rafael Espíndola wrote:
> In the particular case of two static functions or two static global
> pointers, it is possible for the compiler to compute it. Isn't it? I
> think that the linker will reorder the sections, but not the functions
> inside a section.

:-)  Your assumption would not be accurate for all the machines gcc  
targets.  darwin in particular can and does such reordering.


More information about the Gcc mailing list