Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: (char *) and (void *) Message-ID: <6857@brl-smoke.ARPA> Date: 17 Dec 87 20:23:57 GMT References: <6829@brl-smoke.ARPA> <455@xyzzy.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <455@xyzzy.UUCP> throopw@xyzzy.UUCP (Wayne A. Throop) writes: -> gwyn@brl-smoke.ARPA (Doug Gwyn ) -> Pointers to the same object are now guaranteed to compare equal. -> All types of null pointer compare equal. (char *) and (void *) -> have the same representation. -What was the rationale for restricting implementors in this way? It -seems a totally useless restriction, and has potentially cripling effect -on debugging-enhanced implementations. As I recall, the main argument was that lots of existing code is using (char *) data with library routines that we now say take (void *) parameters, without including a header that can declare them using prototypes (to get automatic parameter type conversion). It was desired that such code continue to work when linked with the new ANSI C library.