Meador Inge <mead...@gmail.com> added the comment: > How is the compiler supposed to know whether a and b belong to the same > array when compiling ptr_compare?
I agree with Mark, it doesn't need to know. However, many compilers [1,2] support whole program optimization and could in theory figure the address out using that technique. [1] GCC -flto - http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Optimize-Options.html#Optimize-Options [2] VC++ LTCG - http://msdn.microsoft.com/en-us/library/xbf3tbeh.aspx ---------- nosy: +meador.inge _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10044> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com