Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ll-xn!husc6!necntc!cullvax!drw From: drw@cullvax.UUCP (Dale Worley) Newsgroups: comp.lang.c Subject: Distinguished pointers (was Re: Weird syscall returns) Message-ID: <1437@cullvax.UUCP> Date: Fri, 7-Aug-87 13:25:12 EDT Article-I.D.: cullvax.1437 Posted: Fri Aug 7 13:25:12 1987 Date-Received: Sun, 9-Aug-87 02:58:31 EDT Organization: Cullinet Software, Westwood, MA, USA Lines: 31 guy%gorodish@Sun.COM (Guy Harris) writes: > [The Draft Standard] says, apropos of equality operators, > > If two pointers to objects or functions compare equal, they > point to the same object or function, respectively. > > which pretty clearly indicates that comparison of pointers for > equality is meant to work regardless of whether the two pointers > point into the same array or not. This statement leaves a really nasty ambiguity: If two pointers compare *unequal*, then do they *not* point to the same thing? It seems possible that an implementation could have multiple representations of pointers to a particular object, but how are we to make sure that int X[10]; int *a, *b; a = X; b = X; a++; b++; a == b always returns true? Dale -- Dale Worley Cullinet Software ARPA: cullvax!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw OS/2: Yesterday's software tomorrow Nuclear war? There goes my career!