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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rsand...@gcc.gnu.org from comment #8)
> (In reply to Andrew Macleod from comment #7)
> > wi::sub  sets the overflow flag for 0 - 1 with 1 bit signed...   so the
> > comparison ends up being undefined, and we then make incorrect choices
> > because we think we can.
> Isn't that a bug in wi::sub though?  I think we should fix it rather
> than work around it in callers.

How can one write 0 - 1 in 1-bit signed though?  1 isn't in the range...
One can only do 0 + -1 which doesn't overflow, or 0 - -1 which does.

Reply via email to