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

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Yes, I meant &&.  And yes, folding it either way is strictly valid in both C,
where the result of the relational expression is undefined, and C++ where it's
unspecified.  But besides being inconsistent with the inequality (which is
well-defined in both languages, except perhaps the dubious past-the-end case),
knowing that the pointer cannot very well point into the local object, folding
the relational expression to true would seem rather perverse.  I wouldn't be
surprised if it triggered (latent) bugs.  Folding it to false, OTOH, seems
safe,

Reply via email to