Alright I have tested it with this piece of simple source code.
Code:
#include <stdio.h>
int func1();
int func2(void);
int main(int argc, char **argv) {
int a, b;
a = func1(1, 1, 2);
b = func2();
printf("a = %d\tb = %d\n", a, b);
return 0;
}
int func1(int a, int b) {
return a + b;
}
int func2(void) {
return 3;
}
And this compiles cleanly and ran with the output:
As you can see, in the declaration func1() is declared as just func1().
In main(), it is called with 3 arguments but in the definition of func1() it only needs two of them.
But no errors occur in both the compilation and execution.
Well, I don't think this is a bug in the compiler or what but I am just wondering how can this be useful in real life.
Btw, if you pass any arguments to func2() the an error will occur when you try to compile it.