low level optimization

John F. Woods jfw at ksr.com
Tue Apr 23 01:55:12 AEST 1991


jlg at lanl.gov (Jim Giles) writes:
>In article <1991Apr18.190403.29049 at Think.COM>, barmar at think.com (Barry Margolin) writes:
>> I interpreted the section of the standard that you quoted in another
>> posting as *allowing* separate compilation.  This means that the programmer
>> isn't forced to compile everything together in order to achieve the
>> semantics specified by the language.  [...]
>The standard _allows_ the _USER_ to decide whether to compile separately
>or together.

The standard allows the user to have "translation" done in separate pieces.
For example, my compilation system generates object modules by translating
all comments to Swahili and stores the resulting C code using LZW compression.
The job of the linker is to turn the object modules, plus requested libraries,
into an executable (I usually skip the phase where it logs the comments (in
Sanskrit) to the system console, in order to save paper).  The only thing that
the standard ALLOWS users to depend on is external linkage.  As long as this
compilation system obeys the famous "AS IF" rule, it is standard conformant,
end of discussion.

> Sorry, those are the rules.

Try understanding the rules before yapping about them.  For example,

> And, as I said, if the standard says you _may_
> do something, the implementation _must_ permit you to do it.

If a compilation system waits until it knows where all the source code is
to perform code generation, what is the user not being permitted to do?
Get slow code?  No thanks!



More information about the Comp.lang.c mailing list