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?