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.
Example
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 */
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.