Xref: utzoo comp.lang.c:6060 comp.sys.ibm.pc:10219 Path: utzoo!utgpu!water!watmath!clyde!rutgers!uwvax!umn-d-ub!umn-cs!ems!rosevax!richw From: richw@rosevax.Rosemount.COM (Rich Wagenknecht) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: QC problems Summary: more info on problem Keywords: MS, QC Message-ID: <3826@rosevax.Rosemount.COM> Date: 6 Jan 88 18:55:22 GMT References: <3790@rosevax.Rosemount.COM> <776@ucdavis.ucdavis.edu> Organization: Rosemount Inc., Eden Prairie, MN Lines: 33 Posted: Wed Jan 6 12:55:22 1988 In article <776@ucdavis.ucdavis.edu>, kwok@iris.ucdavis.edu (Conrad Kwok) writes: > In article <3790@rosevax.Rosemount.COM> richw@rosevax.Rosemount.COM (Rich Wagenknecht) writes: > > > >The software runs perfectly under QC with in memory compilation but will > >not run when compiled to an executable using QC or MSC 5.0. > > > >Rich W > > In QC, the default memory model is M(edium) but in QCL and CL the > default memory model is S(mall). That may cause some problems if you > use any pointer to function. Becasue in QC, the pointer will be far > pointer but in QCL and CL, the pointer will be near. So I would > suggest you to compile the program using /AM under QCL and CL. > > Conrad. I've finally been able to get my windowing program to run when compiled to an executable by a) turning of the optimization options in QC b) not using the /Ox option in CL. One of the problems appears to be memset function. When max optimizations are turned on (inline code generation) memset goes wild. I'm still investigating the problem. One other note: If you type cl /help you'll see the /On option listed under optimization options. /On turns off dangerous optimizations. Is there any MS documentation on what constitutes a 'dangerous' optimization? I wasn't able to find any. -- Rich W richw@rosevax.Rosemount.COM Disclaimer: My views may not represent my own much less my employer's.