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: Zack Weinberg <zack at codesourcery dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: Olivier Galibert <galibert at pobox dot com>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, Rupert Wood <me at rupey dot net>, gcc at gcc dot gnu dot org
- Date: Tue, 04 Mar 2003 09:29:04 -0800
- Subject: Re: Putting C++ code into gcc front end
- References: <200303041445.h24Ejhb15458@pc960.cambridge.arm.com>
Richard Earnshaw <rearnsha at arm dot com> writes:
>> Is it reasonable in 2003 to have a quite complex compiler written in
>> K&R C? Not even ISO C?
>
> The last time this came up (probably less than 6 months ago), the answer
> was "yes". We've been round this discussion before. Let's not rehash all
> the same old arguments again.
The last time this came up, I recall the conclusion being 'not for 3.3
but let's revisit this in the 3.4 cycle' which is now. Personally I'd
be happy to see ISO C required for the entire compiler collection at
this point.
> personally, I'd be happy to see people using K+R only compilers to
> start the bootstrap having to do a 4th stage (so that only the C
> compiler has to be K+R). It might even mean that the stage0
> compiler only contains enough code to do non-optimizing
> compilations.
Couple that with Gabriel's point that building all the other front
ends during the bootstrap doesn't really do anything 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.
I also like your idea of a stage0 compiler that only contains enough
code to do non-optimizing compilation. That means we do not have to
worry about the bootstrap compiler generating incorrect code for the
optimizers. (Unfortunately I doubt this helps much -- the hairiest
code in GCC is stuff that would still be required.)
zw