On 01-Aug-2021 06:51, Bram Moolenaar wrote:
Patch 8.2.3263
Problem: Vim9: "..=" does not accept same types as the ".." operator.
Solution: Convert value to string like ".." does. (issue #8664)
Files: src/vim9compile.c, src/testdir/test_vim9_assign.vim,
src/testdir/test_vim9_disassemble.vim
After this patch mingw64 (gcc 11.2.0) spits out this warning:
<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 vim9compile.c -o
gobjnative/vim9compile.o
vim9compile.c: In function 'compile_assignment':
vim9compile.c:7114:21: warning: 'stacktype' may be used uninitialized in
this function [-Wmaybe-uninitialized]
7114 | if (generate_add_instr(cctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~
7115 | operator_type(lhs.lhs_member_type, stacktype),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7116 | lhs.lhs_member_type,
stacktype) == FAIL)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</snip>
The attached patch tries to fix it.
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/85052b90-939f-50fd-1521-a2bfc0df138a%40internode.on.net.
--- vim9compile.c.orig 2021-08-01 07:03:21.539288100 +1000
+++ vim9compile.c 2021-08-01 07:13:50.975729000 +1000
@@ -7083,7 +7083,7 @@
if (oplen > 0 && *op != '=')
{
type_T *expected;
- type_T *stacktype;
+ type_T *stacktype = NULL;
if (*op == '.')
{