8.18 Block scope function declarations

The compiler supports the following extensions to block scope function declarations.

  • 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 */
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.