This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author meador.inge
Recipients amaury.forgeotdarc, eric.smith, mark.dickinson, meador.inge, pitrou, rhettinger, stutzbach, xuanji
Date 2011-01-01.20:24:37
SpamBayes Score 0.0018245826
Marked as misclassified No
Message-id <1293913480.05.0.496910014187.issue10044@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2011-01-01 20:24:40meador.ingesetrecipients: + meador.inge, rhettinger, amaury.forgeotdarc, mark.dickinson, pitrou, eric.smith, stutzbach, xuanji
2011-01-01 20:24:40meador.ingesetmessageid: <1293913480.05.0.496910014187.issue10044@psf.upfronthosting.co.za>
2011-01-01 20:24:38meador.ingelinkissue10044 messages
2011-01-01 20:24:37meador.ingecreate