From: utzoo!decvax!decwrl!sun!megatest!fortune!hpda!hplabs!sri-unix!mullen@Nrl-Css Newsgroups: net.unix-wizards Title: Problem with function returning pointer to function of type void Article-I.D.: sri-arpa.824 Posted: Tue Mar 22 15:13:18 1983 Received: Wed Apr 6 03:58:07 1983 From: Preston Mullen Why does ----- float i=97.; float *g() { return &i; } float *(*f())() { return g; } main() { printf("%g\n",*(*f())()); } ----- work (printing "97"), when ----- void g() { printf("hi\n"); } void (*f())() { return g; } main() { (*f())(); } ----- fails to compile, giving the error message line 2: operands of RETURN have incompatible types ? I think the only significant difference is that "float *" has been replaced by "void" in the definition of g and f. P.S. This is using the 4.1bsd c compiler.