Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sunybcs!acsu.buffalo.edu From: chu@acsu.buffalo.edu (john c chu) Newsgroups: comp.lang.c Subject: I'm confused (Re: What C compilers have non-zero null pointers?) Message-ID: <30820@eerie.acsu.Buffalo.EDU> Date: 16 Jul 90 19:44:12 GMT References: <9007161750.AA00664@edison.CHO.GE.COM> Sender: news@acsu.Buffalo.EDU Organization: SUNY Buffalo Lines: 22 Nntp-Posting-Host: autarch.acsu.buffalo.edu In article <9007161750.AA00664@edison.CHO.GE.COM> rja writes: >I used to use a compiler for MSDOS and the 80x86 cpus >whose NULL pointer was F000:0000 hex when examined via >a debugger. It of course did compile fine as long as one >used sense and compared pointers to NULL rather than >a constant of zero... I thought NULL was a macro defined to be 0 or (void *)0 so that it didn't matter what the computer itself uses for a "null" pointer, C would always use 0 and making it whatever it's suppose to be to fit the computer was the compiler's job. Anyway, I thought comparing a pointer to NULL was the same as comparing a pointer to (a properly cast) zero. Am I way off base? john chu@autarch.acsu.buffalo.edu (When is the next time the FAQ list gets posted? I have a feeling most of my questions are probably answered there.)