You copied the Doc URL to your clipboard.

Block scope function declarations

Two extensions to block scope function declarations are supported:

  • a block-scope function declaration also declares the function name at file scope

  • a block-scope function declaration can have static storage class, thereby causing the resulting declaration to have static linkage by default.


void f1(void)
    static void g(void); /* static function declared in local scope */
                         /* use of static keyword is illegal in strict ISO C */
void f2(void)
    g();                 /* uses previous local declaration */
static void g(int i)
{ } /* error - conflicts with previous declaration of g */