C 표준(c89/c99)이 함수 내 함수(nested function)는 허용하지 않지만 prototype의 선언은 허용한다고 합니다.
즉 다음과 같은 코드가 가능할 거라고 생각합니다.
[code:1]#include <stdio.h>
int main(void)
{
/* function prototype declaration inside function */
/*int foo(int x);*/ /*(1)*/
static int foo(int x); /*(2)*/
printf("%d\n", foo(100));
return 0;
}
/*int foo(int x)*/ /*(1)*/
static int foo(int x) /*(2)*/