low level optimization

Steve Emmerson steve at groucho.ucar.edu
Fri Apr 19 13:47:23 AEST 1991


In <21868 at lanl.gov> jlg at cochiti.lanl.gov (Jim Giles) writes:

>I see that I'm going to have to give a specific example.  Suppose
>that functions A and B are in two separate files.  Suppose that
>I compile them 'together' in some way (that is, the compiler makes
>some use of internal knowledge of B while translating A and vice-versa).
>Now, suppose I _change_ A and retranslate just A (I do _not_ retranslate
>B).  The standard requires that I still be able to link both into a
>single program.  ...

I don't believe the C Standard requires that a compiler capable of the
above generate the separate "object" files A.o and B.o when they are
somehow "compiled together".  My understanding is that it could instead
generate the "object" file AB.o.  Thus, your problem can't occur: you
can't link A.o against a re-compiled B.o *unless* you generated A.o
separately as well.

Steve Emmerson        steve at unidata.ucar.edu        ...!ncar!unidata!steve



More information about the Comp.lang.c mailing list