T
Tim Rentsch
Keith Thompson said:I'm not entirely sure of that myself. Actually, I just hadn't thought
about the void* case.
C99 6.2.5p20 says:
A _pointer type_ may be derived from a function type, an object
type, or an incomplete type, called the _referenced type_.
which seems to imply three different classes of pointers. On the
other hand, 7.18.1.4 is titled "Integer types capable of holding
object pointers", but it talks only about pointers to void (which
themselves, of course can hold the values of any object pointers).
I wouldn't be surprised if the Standard wasn't completely consistent
on this point. My earlier point, however, was about interpreting
casual conversation rather than interpreting language in the
Standard. If I hear someone say "object pointer" I usually expect
that they mean either a "pointer to object type" or "pointer to
incomplete type", unless there is some kind of explicit statement
to the contrary.
In any case, the conversion from void* to a function pointer type
occurs *only* for null pointer constants. It's a special case, which
is why I didn't think of it.
Yes, that's really all I was meaning to say.