Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!yetti!geac!daveb From: daveb@geac.UUCP Newsgroups: comp.unix.questions Subject: Re: Wierd Compilers Message-ID: <1787@geac.UUCP> Date: Fri, 6-Nov-87 09:05:45 EST Article-I.D.: geac.1787 Posted: Fri Nov 6 09:05:45 1987 Date-Received: Sun, 8-Nov-87 08:42:17 EST References: <367@white.gcm> <18964@amdcad.AMD.COM> Reply-To: daveb@geac.UUCP (Dave Collier-Brown) Organization: The little blue rock next to that twinkly star. Lines: 16 Keywords: Sun Summary: Does not follow.... In article <18964@amdcad.AMD.COM> tim@amdcad.UUCP (Tim Olson) writes: > [a discussion of the code generated by while(i--) and while (--i) >This is yet another reason to use pre-decrement over post-decrement when >all that is wanted is the side-effect of decrementing, and the return >value is thrown away. > > -- Tim Olson Er, don't you mean "when the return value **isn't** thrown away? My compiler generates identical code for --i; and i--; when they're independent statements, because they have the same semantics. -- David Collier-Brown. {mnetor|yetti|utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.