This is the mail archive of the gcc@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: Converting GCC to compilation with C++


* 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


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