[PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775)

Jakub Jelinek jakub@redhat.com
Mon Jan 14 08:42:00 GMT 2019


On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote:
> So why is this not just
> 
>   return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y;
> 
> or with the casts elided?  Does the C++ standard say pointers are
> to be compared unsigned here?  Or do all targets GCC support
> lay out the address space in a way that this is correct for pointers
> into distinct objects?

See PR78420 for details on why it is done that way.

	Jakub



More information about the Libstdc++ mailing list