Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!ll-xn!mit-eddie!uw-beaver!tektronix!sequent!mntgfx!tomc From: tomc@mntgfx.mentor.com (Tom Carstensen) Newsgroups: comp.sys.mac.programmer Subject: Bug in MPW C 2.0.2 (PEA instead of PUSH.L) Keywords: mpw c bug Message-ID: <1988Jun22.112228.462@mntgfx.mentor.com> Date: 22 Jun 88 18:22:24 GMT Organization: Mentor Graphics Corporation, Beaverton Oregon Lines: 41 I could not get the MPW C compiler to produce the following assembly code: PUSH.L $09EE _SetClip and I was using the C statement: SetClip( (RgnHandle) 0x09ee ); it always produced: PEA $09EE _SetClip I finally got it to use PUSH.L by the C code: RgnHandle temp temp = 0x09ee; SetClip(temp); . . . return(temp); The return is there so the temp would not get optimized out, or it would use PEA again. PEA is quite different the PUSH.L, if I'm not mistaken. Is this a bug, or am I just being stupid. :------------------------------------------------------------: : Tom Carstensen Usenet: tomc@mntgfx.MENTOR.COM : : Mentor Graphics Delphi: CARSTENSEN : : GEnie: CARSTENSEN : : : : If you are sick and tired, of all your dreadful : : dimensions, let me stretch your TIME! : : - Time Operator : :------------------------------------------------------------: