Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!groucho!steve From: steve@groucho.ucar.edu (Steve Emmerson) Newsgroups: comp.lang.c Subject: Re: low level optimization Message-ID: <11129@ncar.ucar.edu> Date: 19 Apr 91 19:31:40 GMT References: <21961@lanl.gov> Sender: news@ncar.ucar.edu Organization: University Corporation for Atmospheric Research (UCAR) Lines: 42 In <21961@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: >To reiterate, the standard says I may link translated files to previously >translated ones to form programs. It places no constraints on this. As >long as each translated file is itself standard conforming, linking them >together is a capability required by the standard. Hmm... it appears you didn't understand what I was trying to say so I must not have stated it clearly enough. Let me try again. In my opinion the following two scenarios do not violate the standard and yet allow for global-optimization *and* incremental compilation (though not necessarily at the same time). Scenario #1 (demonstration of global-optimization): $ cc -O3 -o foobar.o -c foo.c bar.c $ cc foobar.o Scenario #2 (demonstration of the *required* functionality of incremental compilation): $ cc -O -c foo.c $ cc -O -c bar.c $ cc foo.o bar.o Since, in the above, one can't do both global-optimization and incremental compilation at the same time, I suppose one could argue that the above implementation doesn't conform to the standard (at least when performing global-optimization). This might be true, but I consider it unimportant because, to me at least, the important issues are 1) whether or not the *language* disallows global-optimization (it does not); and 2) whether or not the standard *forbids* behavior or capabilities outside its scope (it cannot). I'll second Barry's sugestion about the MIPS C compiler. Steve Emmerson steve@unidata.ucar.edu ...!ncar!unidata!steve