https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81629
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- In GCC 9+ we produce: <source>:2:27: warning: conflicting types for built-in function 'memcpy'; expected 'void *(void *, const void *, long unsigned int)' [-Wbuiltin-declaration-mismatch] 2 | extern unsigned long long memcpy(unsigned long long, unsigned long long, unsigned long long); | ^~~~~~ <source>:1:1: note: 'memcpy' is declared in header '<string.h>' +++ |+#include <string.h> 1 | And that is because of r9-5637. Note the C++ front-end was already doing the correct thing and produce in GCC 7+:<source>:2:31: warning: declaration of 'long long unsigned int memcpy(long long unsigned int, long long unsigned int, long long unsigned int)' conflicts with built-in declaration 'void* memcpy(void*, const void*, long unsigned int)' [-Wbuiltin-declaration-mismatch] extern "C" unsigned long long memcpy(unsigned long long, unsigned long long, unsigned long long); ^~~~~~ So all fixed.