Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!van-bc!robinson Newsgroups: comp.lang.c Subject: void * and pointers to functions Message-ID: <1990Jul25.213257.7872@mdivax1.uucp> Date: 25 Jul 90 21:32:57 GMT Reply-To: mdivax1!robinson (Jim Robinson) Organization: Mobile Data International, Richmond, B.C., Canada Lines: 14 Return-Path: Apparently-To: van-bc!rnews It is my understanding of K&R I C that a variable of type char * may only contain a pointer to a data object, and that assigning a pointer to a function to such a variable is not guaranteed to work since there is no requirement that pointers to objects be the same size as pointers to functions. After reading the relevant parts of K&R II it would appear that a variable of type void * may legally contain a pointer to a function as well as a pointer to any of the various data types. Is this correct? -- Jim Robinson {uunet,ubc-cs}!van-bc!mdivax1!robinson