Prototype mismatch for str* and mem* functions

Andrej Borsenkow borsenkow.msk@sni.de
Fri Sep 4 07:34:00 GMT 1998


I am not sure, if it is a bug, but ...

Our system has following prototypes:

extern void *memcpy(void *, const void *, size_t);
extern char *strcpy(char *, const char *);
extern int memcmp(const void *, const void *, size_t);
extern int strcmp(const char *, const char *);

As I understand, it corresponds to POSIX.

When I run egcs, I always get the following warnings:

/tools/lib/gcc-lib/i386-sni-sysv4/egcs-2.91.57/include/string.h:27: warning: conflicting types for built-in function `memcpy'
/tools/lib/gcc-lib/i386-sni-sysv4/egcs-2.91.57/include/string.h:29: warning: conflicting types for built-in function `strcpy'
/tools/lib/gcc-lib/i386-sni-sysv4/egcs-2.91.57/include/string.h:35: warning: conflicting types for built-in function `memcmp'
/tools/lib/gcc-lib/i386-sni-sysv4/egcs-2.91.57/include/string.h:36: warning: conflicting types for built-in function `strcmp'

Is it possible to get rid of them?

Thank you in advance

/andrej




More information about the Gcc-bugs mailing list