Hi,

2019/4/29 Mon 0:02:09 UTC+9 [email protected] wrote:
> Hi All,
> 
> Since v8.1.1210, I encounter this error :
> 
> -o gobji686/if_ole.o if_ole.cpp
> In file included from proto.h:230:0,
>                  from vim.h:2084,
>                  from if_ole.cpp:22:
> proto/usercmd.pro:2:74: error: expected ')' before 'compl' token
>  char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int 
> *compl);
>                                                                           
> ^~~~~
> proto/usercmd.pro:2:74: error: expected initializer before 'compl' token
> make: *** [Make_cyg_ming.mak:1061: gobji686/if_ole.o] Error 1
> 
> Building under Windows 10 from MSYS2 32bits with this command:
> make -f Make_ming.mak OLE=yes DEBUG=no GUI=yes XPM=no DIRECTx=yes 
> DYNAMIC_LUA=yes LUA=./lua-5.4.0/src LUA_VER=54 PYTHON3=/c/ThirdPart/Python37 
> DYNAMIC_PYTHON3=yes PYTHON3_VER=37 DYNAMIC_RUBY=no RUBY_VER=26 
> RUBY_API_VER_LONG=2.6.0 RUBY=/c/ThirdPart/Ruby26 TERMINAL=yes EVENT_LOOP=yes

It seems that "compl" is a keyword in C++, so it causes compilation error
when compiling if_ole.cpp as C++.  ("compl" is the same as "~".)  We should
avoid using "compl" as an argument here.

Attached patch should fix it.

Other workarounds:
* Stop using OLE.
* Use MSVC.  MSVC doesn't complain this.

Regards,
Ken Takata

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/proto/usercmd.pro b/src/proto/usercmd.pro
index 45ae3e7fe..b163dac23 100644
--- a/src/proto/usercmd.pro
+++ b/src/proto/usercmd.pro
@@ -1,5 +1,5 @@
 /* usercmd.c */
-char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
+char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *comp);
 char_u *set_context_in_user_cmd(expand_T *xp, char_u *arg_in);
 char_u *get_user_command_name(int idx);
 char_u *get_user_commands(expand_T *xp, int idx);
diff --git a/src/usercmd.c b/src/usercmd.c
index 737b2feef..9ac784a95 100644
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -131,7 +131,7 @@ find_ucmd(
     char_u	*p,	// end of the command (possibly including count)
     int		*full,	// set to TRUE for a full match
     expand_T	*xp,	// used for completion, NULL otherwise
-    int		*compl UNUSED)	// completion flags or NULL
+    int		*comp UNUSED)	// completion flags or NULL
 {
     int		len = (int)(p - eap->cmd);
     int		j, k, matchlen = 0;
@@ -188,8 +188,8 @@ find_ucmd(
 		    eap->addr_type = uc->uc_addr_type;
 
 # ifdef FEAT_CMDL_COMPL
-		    if (compl != NULL)
-			*compl = uc->uc_compl;
+		    if (comp != NULL)
+			*comp = uc->uc_compl;
 #  ifdef FEAT_EVAL
 		    if (xp != NULL)
 		    {

Raspunde prin e-mail lui