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 mark.dickinson
Recipients amaury.forgeotdarc, eric.smith, mark.dickinson, pitrou, rhettinger, stutzbach
Date 2010-10-07.21:36:27
SpamBayes Score 0.00013524177
Marked as misclassified No
Message-id <1286487392.97.0.352339214859.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?

It doesn't need to know.  So long as the compiler can guarantee that its code will produce correct results in the case that a and b *do* both point to the same array, that's enough.  In other words, when producing code for ptr_compare, the compiler is allowed to *assume* that a and b point into the same array, and act accordingly.
History
Date User Action Args
2010-10-07 21:36:33mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, amaury.forgeotdarc, pitrou, eric.smith, stutzbach
2010-10-07 21:36:32mark.dickinsonsetmessageid: <1286487392.97.0.352339214859.issue10044@psf.upfronthosting.co.za>
2010-10-07 21:36:27mark.dickinsonlinkissue10044 messages
2010-10-07 21:36:27mark.dickinsoncreate