Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!prism!gt0657c From: gt0657c@prism.gatech.EDU (geoff george) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C Problem Keywords: DA Message-ID: <17353@hydra.gatech.EDU> Date: 20 Nov 90 06:15:53 GMT References: <1990Oct27.074058.10748@agate.berkeley.edu> <4742@husc6.harvard.edu> <1990Nov18.070105.20735@agate.berkeley.edu> Distribution: usa Organization: Georgia Institute of Technology Lines: 40 This thread has discussed odd addresses of char and string variables, which can be worked around by rearranging declarations. THINK C has done worse to one of my programs. It put the initial value for an Str255 at an odd address (NOT the Str255; its initial value) which makes the initialization code that TC uses blow up with an Address Error on 68000 Macs. (It runs fine on my Mac II, and on a 68020- enhanced Mac Plus at work.) My routine starts as follows: static void DoMenu (long itemCode) { int menuID = HiWord (itemCode); int itemID = LoWord (itemCode); Str255 DAName = "\p"; <-- problem long drvr = 'DRVR'; ... and MacsBug disassembly shows the following code being used to initialize the Str255 DAName with a zero-length value, after setting up the stack frame and initializing the two preceeding ints: ... LEA -$0104(A6), A0 LEA -$1137(A5), A1 <-- odd offset; patently wrong MOVEQ #$3F, D0 MOVE.L (A1)+, (A0)+ <-- blows up DBF D0, ... How do I go about submitting a bug report to Symantec, and what can I expect in the way of response? I understand that this is a known bug, at least among some TC users. geoff -- geoff george geoff@remvax.gatech.edu (my vax) or gt0657c@prism.gatech.edu (a touch of warmth from GaTech OCS) "Ordinary f---ing people - I hate 'em. Ordinary person spends his life avoiding tense situations; repo man spends his life getting INTO tense situations."