Anyone want to guess what gcc generates for a==b?0:a-b ? Any ideas why?
-
-
The code in question is calculating stack usage to figure out if it should recurse or exec, both pointers on same stack.
-
OK, you're bringing in something completely separate from the original topic here. If you want to measure distance in address space for some reason related to the address space model, casts to an integer type are the right way because subtracing non-same-array ptrs is undefined.
-
The topic of the thread you were replying to was subtracting pointers that are either both pointers into the same array, or both null, and you want the result to be 0 in the latter case.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.