Hi, On Sun, May 22, 2022 at 10:41 AM errael <[email protected]> wrote:
> *@errael* commented on this pull request. > ------------------------------ > > In src/vim9execute.c > <https://github.com/vim/vim/pull/8457#discussion_r878903278>: > > > + if (iptr->isn_arg.op.op_type == EXPR_RSHIFT) > + // clear the topmost sign bit > + res &= ~((uvarnumber_T)1 << MAX_LSHIFT_BITS); > > Have you tried it without this post shift fixup? Since the type of the the > left hand side is unsigned, no adjustment is needed. > > > The left operand of a bitshift operator can be a negative number. Earlier I had a check to display an error if the left operand is a negative number. But I removed that check based on one of the comments. I will add some tests for right shifting negative numbers and then remove this code. - Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7n0wsERm%2BcmxVf%2BKLwDuQ1uWrVwkFZ32%3Dw%2BgR%2BYqbPG1A%40mail.gmail.com.
