Path: utzoo!utgpu!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!nic.MR.NET!shamash!tank!uwvax!husc6!spdcc!ima!johnl From: johnl@ima.ima.isc.com (John R. Levine) Newsgroups: comp.sys.ibm.pc Subject: Re: TC2.0 bugfree ? Summary: no bug here Message-ID: <3198@ima.ima.isc.com> Date: 20 Jan 89 20:10:04 GMT References: <3785@druwy.ATT.COM> Reply-To: johnl@ima.UUCP (John R. Levine) Distribution: na Organization: Segue Software, Inc. Lines: 17 In article <3785@druwy.ATT.COM> rhm@druwy.UUCP (MasseyR) writes: >No bugs in TC2.0 ? > ... > i = (*cp++ << 8) + *cp++; [ compiles as though he had written i = (*cp << 8) + *cp, cp += 2; ] No bug here, consult your C manual. C only promises that a postfix ++ will be executed before the next sequence point and the only sequence point here is the end of the statement. Try this instead: i = (cp[0] << 8) + cp[1], cp += 2; -- John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 492 3869 { bbn | spdcc | decvax | harvard | yale }!ima!johnl, Levine@YALE.something You're never too old to have a happy childhood.