Message118127
> Technically arbitrary relational comparisons of pointers are
> undefined, but in practice Antoine's assumptions here are very modest.
> They boil down to:
>
> v >= &array[0] && v < &array[array_len]
I can't say anything about the standard, but p > q looks like it should
be the same as (p - q) > 0, which looks rather well-defined for
pointers.
(at worse we could cast to _Py_uintptr_t, hopefully the compiler
wouldn't produce any different code) |
|
Date |
User |
Action |
Args |
2010-10-07 19:30:55 | pitrou | set | recipients:
+ pitrou, rhettinger, amaury.forgeotdarc, mark.dickinson, eric.smith, stutzbach |
2010-10-07 19:30:54 | pitrou | link | issue10044 messages |
2010-10-07 19:30:53 | pitrou | create | |
|