ts2c
ts2c copied to clipboard
var a=function(){return (function(){})};
var a=function(){return (function(){})};
a()();
static void (*a)()();
void func()
{
}
void (*a_func)()()
{
return (func);
}
int main(void) {
a = a_func;
a()();
return 0;
}
void (*a_func)()()
!
main.c:1:15: error: ‘a’ declared as function returning a function
static void (*a)()();
^
main.c:7:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
main.c: In function ‘main’:
main.c:13:9: error: ‘a_func’ undeclared (first use in this function)
a = a_func;
^~~~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:5: error: called object is not a function or function pointer
a()();