Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!ncar!mephisto!mcnc!rti!sheol!throopw From: throopw@sheol.UUCP (Wayne Throop) Newsgroups: comp.lang.c Subject: Re: p[1] vs. *(p+1) Summary: my point is picky, but still something to it I think Message-ID: <0905@sheol.UUCP> Date: 3 Sep 90 02:04:52 GMT References: <1990Aug31.190103.15043@laguna.ccsf.caltech.edu> <0901@sheol.UUCP> <8382@ncar.ucar.edu> Lines: 20 > From: steve@groucho.ucar.edu (Steve Emmerson) >> [...] it is misleading to say that "adding one to p 'really' adds >> sizeof(*p) to p". [...] it "really" adds 1, and the result points at an >> element [...] which is offset exactly 1 array element [...] > Isn't the point moot if a conforming program can't tell the difference? In terms of correctness, I agree (once one fills in the implied information that one is assuming integer arithmetic on byte offset pointers). But my point wasn't directed at correctness, but at communication. So I'd say the point is moot only if the difference in phrasing doesn't mislead programmers into producing nonconforming programs. And I think it pretty clear that this particular issue misleads more people than many another, and that extreme care in communication is warranted. Then again, maybe I'm just too picky... but I still don't think so. -- Wayne Throop !mcnc!rti!sheol!throopw or sheol!throopw@rti.rti.org