Article View: comp.std.c
Article #4999Re: Is it legal to add 0 to NULL? What about NULL < NULL?
From: Peter Miller
Date: Tue, 09 Apr 1996 05:34
Date: Tue, 09 Apr 1996 05:34
14 lines
931 bytes
931 bytes
In article <ff1d.smail.smayo@tiac.net>, smayo@tiac.net (Scott Mayo) wrote: > I ask because a standard trick for walking an array A of size S is: > > Thing *a = A; > Thing *fence = a + S; > but in my case, if S happens to be 0, a will start out NULL. This makes we > worry about both the value of fence I don't think that is correct: If "a" is set to point to array A, then, after adding zero, it will still point to array A (unless A was a pointer that happended to be NULL). Peter
Technical Details
Message-ID:
<peteski-0804962234320001@ip-pdx19-26.teleport.com>Path:
arc1-ca.pugleaf.net!ip-pdx19-26.teleport.com!userReferences:
<ff1d.smail.smayo@tiac.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!ip-pdx19-26.teleport.com!user From: peteski@teleport.com (Peter Miller) Newsgroups: comp.std.c Subject: Re: Is it legal to add 0 to NULL? What about NULL < NULL? Date: Mon, 08 Apr 1996 22:34:32 -0700 Organization: Teleport - Portland's Public Access (503) 220-1016 Message-ID: <peteski-0804962234320001@ip-pdx19-26.teleport.com> References: <ff1d.smail.smayo@tiac.net> NNTP-Posting-Host: ip-pdx19-26.teleport.com