Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!pasteur!ucbvax!ulysses!hector!jss From: jss@hector.UUCP (Jerry Schwarz) Newsgroups: comp.lang.c Subject: Re: "Noalias" warning and questions Message-ID: <10080@ulysses.homer.nj.att.com> Date: 15 Feb 88 18:47:34 GMT References: <8012@elsie.UUCP> <7249@brl-smoke.ARPA> Sender: netnews@ulysses.homer.nj.att.com Reply-To: jss@hector (Jerry Schwarz) Organization: AT&T Bell Labs, Murray Hill Lines: 22 In article <7249@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <8012@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: > >This is not new; in earlier working drafts this injunction was given >in English near the beginning of Section 4; now it is expressed more >directly in the function interface definitions, using "noalias". >The one hold-out is memmove(), which explicitly DOES permit overlap. > >If "noalias" should disappear (a distinct possibility!), we would >have to put back the English injunction against overlapping *arguments. > You still need the English words. All "noalias" says is that certain patterns of referencing using the pointers are undefined, unless you know what patterns the function will use you don't know what arguments will result in undefined behavior. In strcpy for example you still need words to tell you that there cannot be overlap. As another recent item pointed out, in strcmp you need something else (const) to tell you that the "noalias" in the declarations are noise. Jerry Schwarz