Void function pointers

Doug Gwyn gwyn at smoke.brl.mil
Sat Jan 26 04:03:03 AEST 1991


In article <2887 at casbah.acns.nwu.edu> hpa at casbah.acns.nwu.edu (Peter Anvin) writes:
>Turbo C++ always terminates with a hard "Type mismatch" error.  Is this
>correct behaviour, and if so, is there a way to declare a pointer to a
>function returning *anything or void* but still specify its parameters?

Of course the types did not match; that was obvious and the diagnostic
was quite appropriate.

There is no such thing as a C function returning polymorphic types.
If the return value is sometimes needed and is an int then, and is
sometimes not needed, the function should be defined as returning int.

>P.S. I haven't been able to figure out... is X3J11 ANSI C *finalized* (ANSI
>C-90) or are we still muddling around with working drafts?  

Welcome back from Outer Mongolia!

There are now both American and International standards for C;
the two are technically identical for the moment.  ANS X3.159-1989
was approved in December 1989.



More information about the Comp.lang.c mailing list