Y
Hacker News
new
|
ask
|
show
|
jobs
by
irishcoffee
142 days 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?
2 comments
kevin_thibedeau
142 days ago
It's valid K&R since everything defaults to int. The linker will match the symbols sans prototype. That wasn't obsoleted until C23.
link
irishcoffee
140 days ago
TIL, thank you! (How embarrassing haha)
link
oguz-ismail2
142 days ago
It is valid C89. greet is automatically declared as
int greet();
at call site.
link