Path: utzoo!attcan!uunet!decwrl!shelby!msi-s0.msi.umn.edu!cs.umn.edu!uc!shamash!bls From: bls@u02.svl.cdc.com (Brian Scearce) Newsgroups: comp.lang.c Subject: Re: Seven Original Sins of K&R (Long) Message-ID: <26661@shamash.cdc.com> Date: 4 Oct 90 23:07:35 GMT References: <12780@sdcc6.ucsd.edu> <1990Sep26.163927.26084@dg-rtp.dg.com> <1990Sep26.193626.721@phri.nyu.edu> <1990Sep27.073730.26575@warwick.ac.uk> <1990Sep27.131329.26616@phri.nyu.edu> <1990Sep28.144753.23727@zoo.toronto.edu> <3945@se-sd.SanDiego.NCR.CO <1283.270b3 Sender: news@shamash.cdc.com Lines: 21 browns@iccgcc.decnet.ab.com (Stan Brown, Oak Road Systems) writes: >>>In article <1990Sep27.131329.26616@phri.nyu.edu> > roy@phri.nyu.edu (Roy Smith) writes: >>>>#define NULL (""[0]) This is the same as #define NULL '\0' >>#define NULL 0 This is the same as #define NULL 0 Both are different from #define NULL (void *)0 Neither of the suggested #defines are guaranteed to work with not-all-bits-0-for-NULL implementations if you pass NULL as a parameter to a function with no prototype in scope. >Not exactly or precisely. Every time the first version is invoked, it >creates a separate instance of a one-byte string. There's that, too.