#include <iostream> using namespace std; typedef void f_type(); void foo () {} int main() { f_type f = foo; return 0; }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:9:9: warning: declaration of 'void f()' has 'extern' and is initialized
f_type f = foo;
^
prog.cpp:9:13: error: function 'void f()' is initialized like a variable
f_type f = foo;
^
Standard output is empty