Christ van Willegen wrote:

> I get the following during the compilation of Vim:
> 
> 
> gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=1       -o objects/ex_cmds2.o ex_cmds2.c
> ex_cmds2.c: In function 'profile_divide':
> ex_cmds2.c:985: warning: incompatible implicit declaration of built-in
> function 'round'
> 
> Apparently[*] -std=c99 needs to be added to the gcc flags.
> 
> I'm not very familiar (...) with Vim's bild mechanism, not sure where
> to add this. Any other info that needs to be provided?
> 
> [*]: 
> http://stackoverflow.com/questions/1783792/why-does-gcc-report-implicit-declaration-of-function-round

Weird solution.  Adding -std=c99 changes much more than the round()
header.  Not sure if that is such a good solution.  Vim works fine with
c89 (ANSI C) and should work fine with that.

The error message is also weird.  It does know about the built-in
function, but then says it's implicitly declared.  That doesn't make
sense.  It's not like it doesn't know about round().

Anyway, it works fine for me without the c99 argument.  Thus it appears
only some gcc installations suffer from this.

I suppose we should use the workaround that's in eval.c in f_round().

Well,

-- 
hundred-and-one symptoms of being an internet addict:
130. You can't get out of your desk even if it's time to eat or time
     to go to the bathroom.

 /// 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].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui