Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!compass!worley From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.c Subject: Re: Can analysis detect undefined expressions? Message-ID: Date: 21 Jun 91 14:45:56 GMT References: <14206.285B7688@stjhmc.fidonet.org> <6371@goanna.cs.rmit.oz.au> <6622.Jun2023.40.0891@kramden.acf.nyu.edu> Sender: root@compass.com Distribution: world Organization: Compass, Inc., Wakefield, MA, U.S.A. Lines: 26 In-reply-to: brnstnd@kramden.acf.nyu.edu's message of 20 Jun 91 23:40:08 GMT In article <6622.Jun2023.40.0891@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: In article worley@compass.com (Dale Worley) writes: [ on statements like (i = 1) == (i = 2) ] > The effect of this statement is "undefined", [...] More realistically, there do exist architectures where parts of the first assignment can overlap parts of the second. Or consider this: Suppose the statement is (i = 100000) == (i = 1) And suppose that the two assignments are performed by two parallel processors. And suppose that assignment to a (4-byte) int is *not* atomic -- each processor has to perform it as two 2-byte stores. The result left in 'i' may have the high-order part from one assignment and the low-order part from the other, giving the possible values: 100000 65537 34464 1 Dale Worley Compass, Inc. worley@compass.com -- Managing computer programmers is like herding cats.