[Bug c++/89074] valid pointer equality constexpr comparison rejected

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 5 17:07:17 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89074

--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> At least when not constant evaluating that, a + 2 can be equal to b + 0 or
> can be different, shouldn't we reject at least that?

I think so, according to https://eel.is/c++draft/expr.eq#3.1 and
http://eel.is/c++draft/expr.const#5.25


More information about the Gcc-bugs mailing list