On Thu, Jan 21, 2021, 16:54 Bram Moolenaar <[email protected]> wrote:

>
> Patch 8.2.2389
> Problem:    Test failure on a few systems.
> Solution:   Avoid that "char" value is negative.
> Files:      src/vim9compile.c, src/vim9execute.c, src/vim9.h
>
>
> *** ../vim-8.2.2388/src/vim9compile.c   2021-01-21 20:21:24.240670466 +0100
> --- src/vim9compile.c   2021-01-21 22:51:00.019353529 +0100
> ***************
> *** 826,832 ****
>       if ((isn = generate_instr(cctx, ISN_CHECKTYPE)) == NULL)
>         return FAIL;
>       isn->isn_arg.type.ct_type = alloc_type(expected);
> !     isn->isn_arg.type.ct_off = offset;
>       isn->isn_arg.type.ct_arg_idx = argidx;
>
>       // type becomes expected
> --- 826,834 ----
>       if ((isn = generate_instr(cctx, ISN_CHECKTYPE)) == NULL)
>         return FAIL;
>       isn->isn_arg.type.ct_type = alloc_type(expected);
> !     // Use the negated offset so that it's always positive.  Some
> systems don't
> !     // support negative numbers for "char".
> !     isn->isn_arg.type.ct_off = (char)-offset;
>

Or is it that whether char is signed or not depends on the system?  There's
an int8_T typedef in Vim just for this type of code.

Cheers,
James

-- 
-- 
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/CAFeRdpfW%3DAq%2BoAqGPSokMiLjF%3DYXY1eERevsnaV3AgMkaqEpRw%40mail.gmail.com.

Raspunde prin e-mail lui