4 ms·
This is interesting, but I wouldn't say it is valid C. main() doesn't know about greet(auto s) and wouldn't be able to call it in valid C89, right?
by irishcoffee 9mo ago
This is interesting, but I wouldn't say it is valid C. main() doesn't know about greet(auto s) and wouldn't be able to call it in valid C89, right?
- oguz-ismail2 9mo agoIt is valid C89. greet is automatically declared as int greet(); at call site.
- kevin_thibedeau 9mo agoIt's valid K&R since everything defaults to int. The linker will match the symbols sans prototype. That wasn't obsoleted until C23.
- irishcoffee 9mo agoTIL, thank you! (How embarrassing haha)