Re:Where do argc and argv come from?
by wruza on Tuesday August 11, 2020 @01:53AM
(#24117528)
Technically, local C ABI may be callee-cleanup, and then main() must be special in that it's neither variadic nor fixed-prototype. But in a major compatible reality it's always cdecl, thus not much different from foo(void) being called with foo(int, ptr, ptr) via a prototype mismatch which a compiler is surely unable to detect (that's UB for that exact non-existent ABI reason, as it is for almost half of C). It is only special for a return statement really.
[ Parent
| on HN ]
There are no comments on this comment yet.