Static keyword in function declaration can be missing in function definition?
I want to have a static function which I declare in my .c file before defining it: //file a.c version 1 static int foo(); ... static int foo() { ... } However, it seems that I can leave the static keyword out of the function definition and I get no compiler warnings... e.g. //file a.c version 2 static int foo(); ... int foo() { ... } Am I correct in assuming these two forms are exactly the same? If so, why is this discrepancy allowed and which form should I use? Yes 7.1.1/6 A name declared in a namespace scope without a storage-class-specifier has external linkage unless it has internal