This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Converting GCC to compilation with C++
- From: Michael Veksler <VEKSLER at il dot ibm dot com>
- To: "Dave Korn" <dk at artimi dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 13 Jul 2004 17:58:40 +0300
- Subject: RE: Converting GCC to compilation with C++
- Reply-to:
- Sensitivity:
* Dave Korn:
> There's one thing even more important than the issue of whether we
> have to use C or a C++ compilers to build gcc, and that is that it
> should always be possible to build gcc using the native/proprietary
> (non-gcc) tools that come with a system, so that you can then
> replace those tools with gnu tools.
As an outsider to gcc community, I don't see any unsolvable problems.
C++ code in gcc does not by itself mean gcc can't bootstrap using
"native/proprietary (non-gcc) tools". It only means that there should
be some computer enforced policy in place.
An example for such a policy could be:
- Only optional passes may be coded in C++.
- Many SSA transformation are optional, so SSA may have both C and
C++ interfaces. Optimization passes may be implemented in C++.
- Stage 1 will be compiled using plain C (as it is done today).
No C++ code will be compiled and used (e.g. the optional SSA
transformations - will not be available at the end of Stage 1).
Stage 1 will compile cc1plus (and other critical parts for c++).
- Stage 2 will also compile C++ code needed by GCC.
In this example, you can see that gcc won't even bootstrap if
C++ is accidentally used in the wrong place.
Disclaimer:
I am not participating nor familiar with compiler development.
GCC is interesting to me as user. This means that I may be
off base with my observations.
Michael