4 ms·
It doesn't: int main(void) { struct { int a; } s; return; return &s; return s; } $ gcc test.c test.c: In function ‘main’:
by nolist_policy 3y ago
It doesn't:
int main(void) {
struct {
int a;
} s;
return;
return &s;
return s;
}
$ gcc test.c
test.c: In function ‘main’:
test.c:5:3: warning: ‘return’ with no value, in function returning non-void
5 | return;
| ^~~~~~
test.c:1:5: note: declared here
1 | int main(void) {
| ^~~~
test.c:6:10: warning: returning ‘struct <anonymous> *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]
6 | return &s;
| ^~
test.c:7:10: error: incompatible types when returning type ‘struct <anonymous>’ but ‘int’ was expected
7 | return s;
| ^