Message118142
> 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. |
|
Date |
User |
Action |
Args |
2010-10-07 21:36:33 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, amaury.forgeotdarc, pitrou, eric.smith, stutzbach |
2010-10-07 21:36:32 | mark.dickinson | set | messageid: <1286487392.97.0.352339214859.issue10044@psf.upfronthosting.co.za> |
2010-10-07 21:36:27 | mark.dickinson | link | issue10044 messages |
2010-10-07 21:36:27 | mark.dickinson | create | |
|