Re:Show HN: Bic – a C interpreter and API explorer
by agumonkey on Thursday September 12, 2019 @10:12AM
(#20951623)
I love that you have to #include how to exit :)
[ Parent
| on HN ]
Re:Show HN: Bic – a C interpreter and API explorer
by huhtenberg on Thursday September 12, 2019 @04:26PM
(#20956062)
Technically, you should be able to just call exit(1) because of the C's support for "implicit function declarations".
With no prior exit() declaration, the C compiler would assume that "exit" is "int exit()", spit out the code to push whatever arguments are passed to it down the stack and then just call the damn thing. So, magically, it will all just work. Requires an older compiler though, C89 the latest.