warning: implicit declaration of function 与c99

-U__STRICT_ANSI_

-std=c99 或者 -std=iso9899:1999 使用C99规范。
-std=gnu89 使用c89规范加上gcc自己的扩展(目前默认)
-std=gnu99 使用c99规范加上gcc自己的扩展

编译时更改规范为c99扩展 -std=gnu99 可以解决问题

相关 stdlib.h -std=c99  define _STRICT_ANSI_

解决

https://sourceware.org/ml/newlib/2012/txt00018.txt

http://www.nntp.perl.org/group/perl.perl5.porters/2007/02/msg120546.html

toke.c:544: warning: implicit declaration of function `strlcpy'
toke.c:6178: warning: implicit declaration of function `snprintf'
regcomp.c:9127: warning: implicit declaration of function `snprintf'
dump.c:233: warning: implicit declaration of function `snprintf'
util.c:1650: warning: implicit declaration of function `unsetenv'
util.c:1652: warning: implicit declaration of function `setenv'
util.c:3166: warning: implicit declaration of function `strlcpy'
util.c:4353: warning: implicit declaration of function `snprintf'
util.c:5110: warning: implicit declaration of function `strtoull'
util.c:5117: warning: implicit declaration of function `srand48'
util.c:5118: warning: implicit declaration of function `drand48'
util.c:5441: warning: implicit declaration of function `vsnprintf'
mg.c:744: warning: implicit declaration of function `strerror_r'
mg.c:2514: warning: implicit declaration of function `atoll'
perl.c:3722: warning: implicit declaration of function `strerror_r'
pp_hot.c:1530: warning: implicit declaration of function `strerror_r'
sv.c:2574: warning: implicit declaration of function `snprintf'
pp.c:2840: warning: implicit declaration of function `srand48'
pp.c:2843: warning: implicit declaration of function `drand48'
pp_ctl.c:850: warning: implicit declaration of function `snprintf'
pp_ctl.c:3334: warning: implicit declaration of function `strerror_r'
pp_ctl.c:3511: warning: implicit declaration of function `strlcpy'
doio.c:262: warning: implicit declaration of function `strlcat'
doio.c:831: warning: implicit declaration of function `strerror_r'
doio.c:1461: warning: implicit declaration of function `strlcpy'
universal.c:694: warning: implicit declaration of function `snprintf'
perlio.c:177: warning: implicit declaration of function `fileno'
perlio.c:499: warning: implicit declaration of function `snprintf'
perlio.c:500: warning: implicit declaration of function `vsnprintf'
perlio.c:2827: warning: implicit declaration of function `fdopen'
perlio.c:3259: warning: implicit declaration of function `fseeko'
perlio.c:3268: warning: implicit declaration of function `ftello'
perlio.c:3330: warning: implicit declaration of function `setlinebuf'
perlio.c:5083: warning: implicit declaration of function `mkstemp'
pp_sort.c:787: warning: implicit declaration of function `drand48'
cygwin.c:34: warning: implicit declaration of function `strerror_r'

你可能感兴趣的:(warning: implicit declaration of function 与c99)