Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!rutgers!mcnc!decvax.dec.com!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: void * compatibility Keywords: C void types Message-ID: <18080@haddock.ima.isc.com> Date: 20 Sep 90 03:44:38 GMT References: <8770@b11.ingr.com> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Distribution: usa Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 14 In article <8770@b11.ingr.com> polfer@b11.ingr.com (? Polfer) writes: > int (**command)(); > *command = NULL; > "Type `void *' is not assignment compatible with type `int (*)()'." >isn't a "void *" supposed to be assignment compatible with ALL pointers? No, it's compatible with all *data* pointers. Function pointers need not fit in a `void *'. But (as Chris Torek already pointed out), a null pointer constant is a special case. Your compiler has a bug in that it apparently fails to recognize the `(void *)0' form as a null pointer constant. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint