Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Do you have to cast void pointers when dereferencing them? Message-ID: <1988Dec15.180943.1981@utzoo.uucp> Organization: U of Toronto Zoology References: <2414@ssc-vax.UUCP> Date: Thu, 15 Dec 88 18:09:43 GMT In article <2414@ssc-vax.UUCP> dmg@ssc-vax.UUCP (David Geary) writes: >... Under ANSI C, do I HAVE to cast >my void pointer, or not? Yes. Deferencing a void pointer, whether directly via * or [] or more obscurely via ->, is forbidden. Many old compilers are quite sloppy about what they accept on the left of the -> operator, but this has not been legitimate C for quite a while. -- "God willing, we will return." | Henry Spencer at U of Toronto Zoology -Eugene Cernan, the Moon, 1972 | uunet!attcan!utzoo!henry henry@zoo.toronto.edu