Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!rice!uupsi!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: low level optimization Message-ID: <25371:Apr1907:22:5091@kramden.acf.nyu.edu> Date: 19 Apr 91 07:22:50 GMT References: <21660@lanl.gov> <15881@smoke.brl.mil> <21815@lanl.gov> Organization: IR Lines: 25 In article <21815@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: > You can tell me that until you are blue in the face. I have never seen > any of these hypothetical contexts in which anonymous pointer arguments > passed in as parameters can be safely assumed not to be aliased. > Please give an example. (``Anonymous pointer arguments''?) sort(table,records,n) int *table; struct blah *records; int n; This routine sorts n records, setting table[i] to the position of the i'th smallest record. This is, in fact, a very common type of sort, hardly a ``hypothetical'' or contrived example. I recommend that you read Knuth to learn about sorting and its many applications. Since neither ``int'' nor ``struct blah'' is ``char'' or ``void'', a standard compiler may assume that the pointers are not aliased. (I don't expect Jim to respond to this article; he always ignores counterexamples.) ---Dan