Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: Null revisited (briefly) Message-ID: <7630@chinet.chi.il.us> Date: 4 Feb 89 22:01:32 GMT References: <13068@steinmetz.ge.com> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 12 In article <13068@steinmetz.ge.com> davidsen@crdos1.UUCP (bill davidsen) writes: >A portable program will not assume that it is an int or a pointer, but >will use it in ways which do not make any assumptions as to type. Does the (IMHO) incorrect cast of NULL to (char *) in some compilers stdio.h hurt anything in a correctly written program? That is, does (char *)0 become something other than 0 in the context of an assignment or comparison, and is it treated differently when cast to the correct type (perhaps (int *)(char *)0 or (struct foo *)(char *)0)? Les Mikesell