Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!ucsdhub!sdcsvax!ucbvax!cbosgd!osu-cis!tut!mdf From: mdf@tut.cis.ohio-state.edu (Mark D. Freeman) Newsgroups: comp.unix.questions Subject: Re: Wierd Compilers Message-ID: <1182@tut.cis.ohio-state.edu> Date: Thu, 5-Nov-87 20:29:16 EST Article-I.D.: tut.1182 Posted: Thu Nov 5 20:29:16 1987 Date-Received: Sun, 8-Nov-87 15:00:17 EST References: <367@white.gcm> <18964@amdcad.AMD.COM> <44177@beno.seismo.CSS.GOV> Reply-To: mdf@tut.cis.ohio-state.edu.UUCP (Mark D. Freeman) Organization: StrongPoint Systems, Inc.; Columbus, OH. (guest of Ohio State U.) Lines: 24 In <44177@beno.seismo.CSS.GOV> rick@seismo.CSS.GOV (Rick Adams) writes: >Even a mediocre compiler should be able to recognize that > a++; >is equivalent to > ++a; >if there is no assignment, etc. > >There is really no excuse for not making this trivial optimization. You should >not have to depend on the user doing it. Forgive a possibly stupid question, but in what way is there any difference between a++ and ++a in the generated code, even with the optimiser disabled. Note: I am not arguing with you, merely asking for more information. -- Mark D. Freeman (614) 262-3703 StrongPoint Systems, Inc. mdf@tut.cis.ohio-state.edu 2440 Medary Avenue ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!mdf Columbus, OH 43202 Guest account at The Ohio State University