News for hackers. Stuff that matters.
Re:F() vs. F(void) in C vs. C++ by kazinator on Monday May 13, 2019 @01:33AM (#19896632)
The construct would be a pointless throwback to poorer type safety. Every C function call is statically typed and so is a function definition. The declaration of what is being called may tell you nothing about the argument list, but the call expression which uses that identifier will assume a static type for it, based on how it is called. The call will be compiled assuming it has a certain type, which may or may not match what is being called. There is no run time-check; if it's wrong, it's undefined behavior.

There are no comments on this comment yet.