On Thu, 8 Jan 2009, Jean Delvare wrote:
Hi Mads,
Le jeudi 08 janvier 2009, Mads Martin Joergensen a écrit :
Jump to memccpy(3) at the bottom. It says:
CONFORMING TO SVr4, 4.3BSD, C99.
Now look at the following program:
$ cat memccp.c #include
#include int main() { void *s, *d, *r;
s = malloc(1024); d = malloc(1024);
r = memccpy(s, d, 0, 1024);
return 0; }
And now compile it:
$ gcc -std=c99 -Wall memccp.c memccp.c: In function ‘main’: memccp.c:10: warning: implicit declaration of function ‘memccpy’ memccp.c:10: warning: assignment makes pointer from integer without a cast
Is this due to gcc not fully supporting C99? Would a possible solution be to remove the -std=c99 from the compile options, or would that bring other problems?
For what it's worth, the French manual page doesn't list C99 in the conformance section. So you might want to check whether memccpy is really part of C99. If it is, you might want to check when C99 was added to the manual page. Maybe the person who updated the manual page forgot to update the glibc headers accordingly.
Correct. memccpy is definitely not in C99.
Richard.
--
Richard Guenther