[Bug libstdc++/78420] [5/6/7 Regression] std::less<T*> is not a total order with -O2 enabled
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 23 21:45:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Ville Voutilainen from comment #11)
> Ah, the plot thickens. Jens Maurer wrote:
>
> "Regarding the std::less<T*> issue, it seems a bug in the standard
> to require that it be constexpr and deliver a total order. After
> all, the addresses of global objects are defined by the linker,
> so it doesn't seem plausible to get a compile-time answer for
> std::less<T*> that is the same as a later run-time answer."
That doesn't make sense to me; you can call a constexpr function with
non-constant arguments and get a non-constant result. There's no requirement
that it give a total order at compile time, is there?
More information about the Gcc-bugs
mailing list