On Thu, Jun 25, 2009 at 10:32 PM, Ian Lance Taylor<i...@google.com> wrote: > I am pleased to report that if you configure gcc with > --enable-build-with-cxx, which causes the core compiler to be built > using a C++ compiler, a bootstrap on x86_64-unknown-linux-gnu now > completes. > > I would like to encourage people to try using --enable-build-with-cxx in > other configuration--other bootstraps, cross-compilers--to see how well > it works. Please let me know if you run into problems that you don't > know how, or don't have time, to fix. > > This completes the first phase of the gcc-in-cxx project, which I > started about one year ago at the 2008 GCC Summit. > > At this point I personally will probably not work on this project for > some weeks, other than bug fixing. Further steps on the overall project > of converting gcc to C++ are: > > * Write a coding standards document for gcc in C++. > > * Convert more code to be compiled as C++ when using > --enable-build-with-cxx. Currently the generator programs > (genattrtab, etc.) and libcpp are still compiled as C. > > * Develop some trial patches which require C++, e.g., convert VEC to > std::vector. > > * Test starting the bootstrap with earlier versions of the compiler to > see which C++ compiler version is required, and document that. > > * Petition the steering committee for formal approval to switch to C++. > > I do not expect to convert the compiler to require C++ in the 4.5 > timeframe.
I think it would be a good thing to try forcing the C++ host compiler requirement for GCC 4.5 with just building stage1 with C++ and stage2/3 with the stage1 C compiler. --disable-build-with-cxx would be a workaround for a missing C++ host compiler. That should give us an idea on what problems we are going to face when switching to actual C++ code. Richard. > I encourage anybody who is interested to experiment with these further > steps. > > Ian >