Non-standard signature of main() compiles successfully
问题 In this code: int main(int a, int b) { printf(" main(int, int) works \n\n"); return 0; } the signature of main is main(int, int) , and it compiles successfully. Why? 回答1: Because the C standard doesn't prohibit non-standard signatures for main (see e.g. section 5.1.2 of the C99 standard). However, you'll find that if you compile under GCC with the -Wall flag, 1 it will complain: test.c:4: warning: second argument of 'main' should be 'char **' It assumes that you want to interact with a