This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Putting C++ code into gcc front end
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 4 Mar 2003 12:52:56 -0500
- Subject: Re: Putting C++ code into gcc front end
Zack sez:
>Couple that with Gabriel's point that building all the other front
>ends during the bootstrap doesn't really do anything useful...
It tests the GCC C compiler on the code in the other front ends. This
is, technically, something useful. :-)
>Ignoring Ada for the moment, what if we only built the C front end,
>optimizers, and back end during all three stages of a bootstrap? And
>then came back to build the other front ends when we were done? At
>that point, using C++ in the Java front end becomes substantially less
>hassle: we just have to make sure the C++ front end and runtime
>library are built first. This effectively puts each front end on the
>same footing as its runtime library.
Uh. The problem is, simply, that currently all languages are built as
part of 'one compiler'. I'm not sure it's safe or easy to try to
decouple the middle-end/back-end build from the front end builds as much
as you (and Gaby) seem to be suggesting. It may be, I'm just not sure.
If it isn't easy, then 'making sure the C++ front end and runtime
library are built first' means 'making sure a complete build is
done including C++ first', which means *extra stages*. This is the
point I seem to have trouble getting across.
Let me try to say it another way. Can we -- easily -- build a 'C only'
compiler and then 'add' C++ to that compiler? I'm guessing no, in which
case the only easy things to do are to build a 'C only' compiler and
then build a 'C and C++' compiler (extra stage), or just build a 'C and
C++' compiler to start with (requires C90 system compiler and C90
compliance in the C++ front end -- or K&R compliance in the C++ front
end).
--Nathanael