https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88687
Bug ID: 88687 Summary: redundant -Wbuiltin-declaration-mismatch after -Wimplicit-function-declaration Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The -Wbuiltin-declaration-mismatch warning below should probably only be issued if -Wimplicit-function-declaration is disabled, otherwise it's mostly redundant (although only one instance of the latter warning is issued for each implicit declaration regardless of the number of calls). In addition, the <built-in>: note after the -Wbuiltin-declaration-mismatch warning is meaningless. $ cat t.c && gcc -O2 -S -Wall -Wextra t.c int f (const char *s) { return memcmp (s, "1234", 4); } t.c: In function ‘f’: t.c:3:10: warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration] 3 | return memcmp (s, "1234", 4); | ^~~~~~ t.c:3:29: warning: ‘memcmp’ argument 3 type is ‘int’ where ‘long unsigned int’ is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 3 | return memcmp (s, "1234", 4); | ^ <built-in>: note: built-in ‘memcmp’ declared here