https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91227
--- Comment #15 from Martin Sebor <msebor at gcc dot gnu.org> --- I agree that comparison of the intptr_t values would be preferable over extending the pointer inequality semantics. It's the intended mechanism for this sort query. It makes code that relies on the ordering of unrelated objects easy to distinguish from accidental pointer misuses, which in turn makes it possible to both detect bugs and emit better object code.