CompuServe Messages

#Optimizer Useless!?

    19-Jul-93 14:29:21
Sb: #Optimizer Useless!?
Fm: Ken Broomfield 70650,523
To: Thomas Emerson <Sysop> 70414,2266
————————————————————————– I originally sent this message almost three weeks ago. I called the tech support line a week ago. I still haven't gotten an answer to what ought to be a straightforward question. ————————————————————————– Sir– I'm running into a problem with the C++ compiler. It seems to fail to optimize functions that contain calls to the Mac Toolbox. It's as if the "nooptimize" pragma (which I guess only exists in Think C) is turned on for such calls, but I can't find any explicit directive which would cause this. Using ResEdit, I have discovered a list of Mac Toobox trap names embedded in the C++ translator for _SOME_ reason. Does the C++ compiler do this by default for Toolbox calls? Why is it necessary for ALL traps to be handled this way, even traps which are stack-based (as opposed to register-based, which may understandably cause trouble for an optimizer)? This would seem to render the optimizer much less useful, since Toolbox calls are strewn throughout a typical program. Thanks for any info on this. –Ken