This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: final intermodule patch


Geoff Keating wrote:
>so how could we get interaction between modules?
Symbol renaming.

*sigh* I should never have mentioned the word 'intermodule'.  I should
have just said "looky, here's a way to compile multiple files into a
single .o!" and let people deduce for themselves what it's good for.

Well, perhaps unlike other people that's *precisely* what I'm complaining about. Combining multiple .c files into a single .o can always be done by having one .c file #include another. What you're doing is more specific: combining multiple translation units into a single .o.


The whole "translation unit" stuff in C and C++ makes me feel that it is not the business of the compiler (cc1/cc1plus/etc) to take multiple "translation units" and put them in an inseparable manner into one .o file, and that it shouldn't do that unless you tell it to really loudly. Perhaps even by using an entirely different program, such as "cc1-combine-files", although that's probably overkill. (This combination is the business of the linker, of course.)

(I could be wrong about what your patch does; if I am wrong, then how do you take the produced .o and link only to one of the translation units in it?)

In Pascal there is no such concept as a "translation unit", so I wouldn't complain there. In Java, there's no "translation unit" concept, but there is a very definite idea of each class having its own file. Fortran and Ada I don't know about.

Other peoples' mileage may differ, in which case fine. But this is where I'm coming from.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]