On Tue, 5 May 2009, Richard Guenther wrote: > 2009/5/5 Pramod Joisha <pramod_joi...@hotmail.com>: > > > > > > Presently, the -combine option works only for C sources. I was > > wondering whether there are technical reasons for not supporting it > > for C++ sources. If not, are there plans for providing this support in > > the near future? > > As LTO will obsolete -combine I do not see that -combine will be > ever implemented for anything else besides C.
Formally there are things -combine does that LTO doesn't (front-end-specific consistency checks across translation units, supporting non-ELF targets). But I agree we should deprecate -combine when LTO goes in (or better, deprecate the mechanism it uses and make the driver transparently wrap LTO if possible); the consistency checks might better be done through plugins, and there should be no great difficulty in adding LTO support for non-ELF targets (that support arbitrary named sections) if desired. (The C++ front end should still grow some sort of support for handling information from multiple translation units at once to implement exported templates, but that's another matter.) -- Joseph S. Myers jos...@codesourcery.com