On 04-Apr-2022 06:12, Bram Moolenaar wrote:
Patch 8.2.4678
Problem:    Vim9: not all code is tested.
Solution:   Add a few more tests.
Files:      src/vim9execute.c, src/testdir/test_vim9_script.vim,
             src/testdir/test_vim9_import.vim, src/testdir/test_vim9_cmd.vim



After this patch, mingw64 (gcc 11.2.0) throws this error:
<snip>
gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9execute.c -o gobjnative/vim9execute.o
In file included from vim9execute.c:15:
vim9execute.c: In function 'exec_instructions':
vim9execute.c:2640:37: error: 'e_cant_open_file_str_2' undeclared (first use in this function); did you mean 'e_cant_open_file_str'?  2640 |                             semsg(_(e_cant_open_file_str_2), si->sn_name);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~
vim.h:564:25: note: in definition of macro '_'
  564 | # define _(x) ((char *)(x))
      |                         ^
vim9execute.c:2640:37: note: each undeclared identifier is reported only once for each function it appears in  2640 |                             semsg(_(e_cant_open_file_str_2), si->sn_name);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~
vim.h:564:25: note: in definition of macro '_'
  564 | # define _(x) ((char *)(x))
      |                         ^
make: *** [Make_cyg_ming.mak:1187: gobjnative/vim9execute.o] Error 1
</snip>

The attached patch tries to fix it.

Also, I noticed that two error messages have the same error number in errors.h:



Cheers
John

--
--
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/7060f31a-7608-b503-bd4b-361487bf2494%40internode.on.net.
--- errors.h.orig       2022-04-01 05:46:13.356515400 +1100
+++ errors.h    2022-04-04 06:42:25.760817400 +1000
@@ -1123,8 +1123,10 @@
 #ifdef FEAT_POSTSCRIPT
 EXTERN char e_error_writing_to_postscript_output_file[]
        INIT(= N_("E455: Error writing to PostScript output file"));
+#endif
 EXTERN char e_cant_open_file_str_2[]
        INIT(= N_("E456: Can't open file \"%s\""));
+#ifdef FEAT_POSTSCRIPT
 EXTERN char e_cant_find_postscript_resource_file_str_ps[]
        INIT(= N_("E456: Can't find PostScript resource file \"%s.ps\""));
 EXTERN char e_cant_read_postscript_resource_file_str[]

Raspunde prin e-mail lui