Casting function ptrs

Chris Torek chris at mimsy.UUCP
Wed May 25 07:15:35 AEST 1988


>chris at trantor.umd.edu (me, using trantor while the broadband network
was out), write:
>>This is not strictly conforming, because the standard does not say
>>whether objects of type `void (*)()' are in any way compatible with
>>objects of type `char *(*)()'. ...

In article <7330004 at hpcllz2.HP.COM> walter at hpcllz2.HP.COM (Walter Murray)
writes:
>... page 47 of the January draft:  "A pointer to a function of one
>type may be converted to a pointer to a function of another type and
>back again; the result shall compare equal to the original pointer."

Oops.  You are right; I missed this paragraph.

(Though I wonder whether some implementor might construe this to mean
that the result need only *compare equal* but not necessarily be
*useful*.  But that would be stupid.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list