legality of assignment of function to a void *.

Doug Gwyn gwyn at smoke.brl.mil
Sun Nov 18 01:35:26 AEST 1990


In article <4e0cac89.20b6d at apollo.HP.COM> blodgett at apollo.HP.COM (Bruce Blodgett) writes:
>Was it really the intent of the ANSI C committee not to allow void
>pointers from holding uncasted function addresses (in either
>conforming or strictly conforming programs)?

There seems to be general agreement among the X3J11 members I've discussed
this with that void* need not be capable of holding pointer to function.
A strictly conforming program could not so use it.  A conforming program
can do whatever it can get away with.  Conforming implementations have the
option whether or not to support the property in question.  I would expect
that only those environments requiring more data to specify function
pointers than to specify object pointers would impose the restriction.
(Well, also environments intended to assist in developing strictly
conforming programs.)



More information about the Comp.std.c mailing list