UBだ♪
$ cat return.c
#include <stdlib.h>
#include <stdio.h>
int function(void){
return;
}
int main(void)
{
printf("%d\n", function());
return 0;
}
$ gcc return.c && ./a.out && ./a.out && ./a.out
return.c: In function ‘function’:
return.c:5:3: warning: ‘return’ with no value, in function returning non-void
5 | return;
| ^~~~~~
return.c:4:5: note: declared here
4 | int function(void){
| ^~~~~~~~
-198725291
1404641621
1343713621