More fun with types...

Henry Spencer henry at utzoo.UUCP
Sat Jan 19 08:23:59 AEST 1985


> ... In other words, should pointer-to-function types be
> considered assignment-compatible ONLY if both the return type and
> the formal parameter declarations match?

Probably.  This would seem to be a hole in the fussy type-checking of
the current ANSI draft.

> What do we use for a generic function pointer?

Damned if I know...  I think the situation would be the same as the one
for data pointers before "void *":  you have to use casts everywhere.
It's not obvious to me that we need a function-pointer equivalent of
"void *", since I don't remember any function-pointer analog of malloc.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list