Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Do you have to cast void pointers when dereferencing them? Keywords: (With ANSI C) Message-ID: <749@auspex.UUCP> Date: 17 Dec 88 22:46:11 GMT References: <2414@ssc-vax.UUCP> <15012@mimsy.UUCP> <3050@arcturus> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 17 >My assumption (about the dbANS) comes from the understanding that >different pointers can have different representations (on some machines). >To say that pointer_of_one_type = pointer_of_another_type is legal, the >code must know the type of the lvalue to put the rvalue into the proper >representation. Is this not true? Yes, it's true, and the compiler *does* know the type of the lvalue, so it can generate code to do the implicit conversion properly. Why is this any different from int foo; float bar; bar = foo; which also causes an implicit conversion from "int" to "float"?