Is it possible to declare some function type func_t which returns that type, func_t?
func_t
In other words, is it possible for a function to retur
A possible solution with structs:
struct func_wrap { struct func_wrap (*func)(void); }; struct func_wrap func_test(void) { struct func_wrap self; self.func = func_test; return self; }
Compiling with gcc -Wall gave no warnings, but I'm not sure if this is 100% portable.
gcc -Wall