John Marriott wrote:
> On 02-Mar-2020 00:05, Bram Moolenaar wrote:
> > Patch 8.2.0339
> > Problem: Vim9: function return type may depend on arguments.
> > Solution: Instead of a fixed return type use a function to figure out the
> > return type.
> > Files: src/evalfunc.c, src/proto/evalfunc.pro, src/vim9compile.c,
> > src/evalbuffer.c, src/proto/evalbuffer.pro,
> > src/testdir/test_vim9_script.vim
> >
> Hi,
>
> After this patch mingw spits out this error if FEAT_FLOAT is not defined:
> <snip>
> gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_MSWIN
> -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
> -freg-struct-return evalfunc.c -o gobjnative/evalfunc.o
> evalfunc.c: In function 'ret_float':
> evalfunc.c:286:13: error: 't_float' undeclared (first use in this
> function); did you mean 'ret_float'?
> 286 | return &t_float;
> | ^~~~~~~
> | ret_float
> evalfunc.c:286:13: note: each undeclared identifier is reported only
> once for each function it appears in
> At top level:
> evalfunc.c:284:1: warning: 'ret_float' defined but not used
> [-Wunused-function]
> 284 | ret_float(int argcount UNUSED, type_T **argtypes UNUSED)
> | ^~~~~~~~~
> make: *** [Make_cyg_ming.mak:1113: gobjnative/evalfunc.o] Error 1
> </snip>
>
> Please see the attached patch which tries to fix it.
I'll include it, thanks.
--
Although the scythe isn't pre-eminent among the weapons of war, anyone who
has been on the wrong end of, say, a peasants' revolt will know that in
skilled hands it is fearsome.
-- (Terry Pratchett, Mort)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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/202003011935.021JZKL1032636%40masaka.moolenaar.net.