Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!psuvax1!psuvm!cxt105 From: CXT105@psuvm.psu.edu (Christopher Tate) Newsgroups: comp.sys.mac.programmer Subject: Re: MPW compiler bugs Message-ID: <90047.135014CXT105@psuvm.psu.edu> Date: 16 Feb 90 18:50:14 GMT References: <1990Feb16.012322.19895@oracle.com> Organization: Penn State University Lines: 28 In article <1990Feb16.012322.19895@oracle.com>, gstein@oracle.com says: >Hmm... > >I had thought that Think C works on a file by file basis. If you >include a routine from a file, the WHOLE file is pulled in. Note, >though, that this doesn't count for projects/libraries: in these it >picks the file out of the project. As for the ANSI library, Think has >split up the source into a bunch of tiny files. Since you use one >routine, you get one (little) file. I know that using "Run..." >doesn't do any dead code analysis and you pick up whole libraries/ >projects (e.g. MacTraps), but building is different. I'm not sure about this, but I think that THINK C does its dead-code removal on a SEGMENT-basis. If you have several routines in the same segment in your project (which you are including as a library), and you use any one of them, you'll wind up with all of them in your final build. But, you won't have any code from other segments of the same included project. Note that this applies to *projects* which are included in other projects, not to actual "libraries." ------- Christopher Tate | "And as I watch the drops of rain | Weave their weary paths and die, cxt105@psuvm.psu.edu | I know that I am like the rain; {...}!psuvax1!psuvm.bitnet!cxt105 | There but for the grace of you go I." cxt105@psuvm.bitnet | -- Simon & Garfunkle