https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106529
--- Comment #4 from Thomas Klausner <tk at giga dot or.at> ---
Well, I can one-up that one:
int sincos();
int main() {
return sincos();
}
gives:
sincos.c:1:5: warning: conflicting types for built-in function ‘sincos’;
expected ‘void(double, double *, double *)’ [-Wbuiltin-declaration-mismatch]
1 | int sincos();
| ^~~~~~
sincos.c:1:1: note: ‘sincos’ is declared in header ‘<math.h>’
+++ |+#include <math.h>
1 | int sincos();
ld: /tmp//ccO3U7pd.o: in function `main':
sincos.c:(.text+0xa): undefined reference to `sincos'
a) there is no conflict since there is no builtin or otherwise sincos()
function
b) it is not declared in math.h
the linker warning is correct though :)