Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: compiler bug, THINK 4.0.2 Keywords: MULS, FMOVE.W Message-ID: <3193@husc6.harvard.edu> Date: 13 Jun 90 01:43:49 GMT References: <18473@well.sf.ca.us> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Distribution: comp Organization: Symantec Language Products Group Lines: 21 In article <18473@well.sf.ca.us> wdh@well.sf.ca.us (Bill Hofmann) writes: >Ran into a little code generation bug in THINK 4.0.2, in which two shorts >are multiplied (producing a long result) and stored into a double. Alas, >the compiler only moves the low word, producing data-specific wierdness. I'm fairly sure this isn't a bug, since the C semantics don't require sign-extension to a long unless the target or one of the operands is a long. You can force this sign-extension by placing a (long) in front of one of the operands in your expression. R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "It's not the years, honey, it's the mileage." ~~~~~~~~~~~~~~~