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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>that's v != 0 | v == c, I don't think that's equal to the original expression.

It is.

Here is the proof there:
((v > 0) ? -1 : 0) > ((v != c) ? -1 : 0)
v is unsigned char:
((v != 0) ? -1 : 0) > ((v != c) ? -1 : 0)

((v != 0) ? (-1 > ((v != c) ? -1 : 0)) : 0 > (((v != c) ? -1 : 0)))

(v != 0) ? 0 : (((v == c) ? -1 : 0))

((v != 0) | (v == c)) ? -1 : 0

Reply via email to