Xref: utzoo comp.std.c:1012 comp.lang.c:17430 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!lll-lcc!lll-winken!uunet!mcvax!ukc!etive!hwcs!zen!frank From: frank@zen.co.uk (Frank Wales) Newsgroups: comp.std.c,comp.lang.c Subject: Re: realloc Summary: bad assumptions Message-ID: <1555@zen.UUCP> Date: 4 Apr 89 08:58:29 GMT References: <10170@bloom-beacon.MIT.EDU> <10032@ihlpb.ATT.COM> <1196@cmtl01.UUCP> Reply-To: frank@zen.co.uk (Frank Wales) Organization: Zengrange Limited, Leeds, England Lines: 15 In article <1196@cmtl01.UUCP> oisin@cmtl01.UUCP (Oisin) writes: >in Article 131 of comp.std.c: gregg@ihlpb.ATT.COM (Wonderly) says: >>or are you one of those people that assumes (*((char *)NULL) == 0) too? > >Pardon my ignorance, but if I'm wrong you can flame me too... >Does the draft not specify that whatever implementation of NULL is used, >the compiler must guarantee that a ptr containing that implementation's >version of NULL must test as false? [just a singe] Gregg was actually bemoaning the extremely fragile assumption that dereferencing a NULL pointer yields 0, probably the commonest single pain in the arse to those who would port other people's programs. -- Frank Wales, Systems Manager, [frank@zen.co.uk<->mcvax!zen.co.uk!frank] Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217