[Bug tree-optimization/91227] pointer relational expression not folded but equivalent inequality is
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 26 11:53:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91227
--- Comment #12 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Florian Weimer from comment #11)
> GCC on ELF provides defined address ordering for separate objects via linker
> ordering and section attributes. I think part of these extensions is that
> it is possible to check at run time whether an object falls into a specific
> section, and where. Support for this must be preserved in some fashion.
How about casting to uintptr_t before comparing? It isn't really formalized,
but I think that's the extension gcc provides to safely do such comparisons.
More information about the Gcc-bugs
mailing list