foo.c: In function 'th':
foo.c:9:4: warning: implicit declaration of function 'tsrlen' [-Wimplicit-function-declaration]
9 | m=tsrlen(s1);
| ^~~~~~
foo.c:10:4: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
10 | n=strlen(s2);
| ^~~~~~
foo.c:10:4: warning: incompatible implicit declaration of built-in function 'strlen'
foo.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
1 | #include<stdio.h>
+++ |+#include <string.h>
2 |
foo.c: In function 'main':
foo.c:35:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
35 | gets(s1);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c:36:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
36 | gets(s2);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c:37:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
37 | gets(s3);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c: In function 'th':
foo.c:30:1: warning: control reaches end of non-void function [-Wreturn-type]
30 | }
| ^
foo.c: In function 'main':
foo.c:35:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
35 | gets(s1);
| ^~~~~~~~
foo.c:36:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
36 | gets(s2);
| ^~~~~~~~
foo.c:37:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
37 | gets(s3);
| ^~~~~~~~
/usr/bin/ld: /tmp/cc58fO6i.o: in function `main':
foo.c:(.text.startup+0x58): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /tmp/cc58fO6i.o: in function `th':
foo.c:(.text+0x4f): undefined reference to `tsrlen'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务