GCC allows us to give more arguments than needed. But G++ does not allow it. I have checked c99 standard document. I can't find a description of this behavior. So it is possible that GCC has chosen to allow such kind of function invocations.
#include <stdio.h> void show() { printf("show something\n"); } int main(int argc, const char *argv[]) { show("abc"); }
jing@jingguolin:~$ gcc code.c
jing@jingguolin:~$ ./a.out
show something
jing@jingguolin:~$ g++ code.c
code.c: In function ‘int main(int, const char**)’:
code.c:3: error: too many arguments to function ‘void show()’
code.c:10: error: at this point in file