#include <iostream> using namespace std; typedef rec (*rec)(void); rec func(void){ return &func; } int main() { return 0; }
Standard input is empty
prog.cpp:4:13: error: ISO C++ forbids declaration of ‘rec’ with no type [-fpermissive] typedef rec (*rec)(void); ^ prog.cpp:4:13: error: typedef ‘rec’ is initialized (use decltype instead) prog.cpp:4:15: error: ‘rec’ was not declared in this scope typedef rec (*rec)(void); ^~~ prog.cpp:6:1: error: ‘rec’ does not name a type rec func(void){ ^~~
Standard output is empty