Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!mephisto!ncsuvx!news From: rnf@shumv1.uucp (Rick Fincher) Newsgroups: comp.sys.apple Subject: Re: ORCA/C problems Message-ID: <1990Feb7.171108.553@ncsuvx.ncsu.edu> Date: 7 Feb 90 17:11:08 GMT References: <1990Feb7.034310.5315@ux1.cso.uiuc.edu> Reply-To: rnf@shumv1.ncsu.edu (Rick Fincher) Organization: NCSU Computing Center Lines: 42 In article <1990Feb7.034310.5315@ux1.cso.uiuc.edu> jb10320@uxa.cso.uiuc.edu (Jawaid Bazyar) writes: >I just got ORCA/C in the mail and am having a problem with it. The code >ran fine under APW so I'm thinking it's a compiler bug. The code in >question leaves excess values on the stack, evidently, and crashes upon >return. Anyone know of any bugs in ORCA that would do this? (I'm sending >my registration card in tomorrow, Byteworks said they had beta versions >with bug fixes.). It's not really a bug. What usually happens is that functions are not properly typed so the calling routine pulls the incorrect number of parameters off the stack. This works in APW because the compiler does stack repair in cases of bad code like this. The example in the docs of the beta upgrade compiler is: printf("%ld", 2); /* This is ILLEGAL */ This doesn't work because printf is expecting a long and gets an int. Four bytes are pulled off the stack when only 2 were pushed. You can send a note to the Byte Works when you send in your warranty card or call them and they will send you a beta version of the new compiler that will generate stack repair code (at the cost of speed). It is best to get that stuff out of your code and compile without this option, then you get the best speed. If you are on America Online send Mike Westerfield a note (MikeW50) and he will mail you the new compiler online once he has your warranty card. I would go ahead and get it. The 1.0 compiler has numerous bugs that can be annoying that have been fixed in the beta release. You should get the new final version of the compiler free when it is released. > >This is a really nice package, and I'd like to use it. >Thanx in advance... I like it too, there are some differences in APW and ORCA C because of ANSI standardization but they are minor. I find that the biggest difference in my ORCA C code is the replacement of a couple of pages of APW C code with the startDesk function. If you isolated all of your startup code in a function, though, this will be simple. You can still manually start your tools if you want to though. Rick Fincher rnf@shumv1.ncsu.edu