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

--- Comment #3 from eggert at cs dot ucla.edu ---
(In reply to Andrew Pinski from comment #1)
> >-1L << 63 is LONG_MIN
> No it is undefined and has an overflow bit on it.
> You want (long)(-1UL << 63) for it be correct.
> But the warning is still there.

I updated the attachment to avoid any undefined behavior, by replacing -1L<<63
with -1-9223372036854775807L. As you say, the bug is still there.

> I thought -fsanitize=undefined enabled -fwrapv too ...

It doesn't. (Perhaps you meant -ftrapv?)

Reply via email to