This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using C++ in GCC is OK
Jakub Jelinek wrote:
>> I just really hope we will have strict criteria that any transition will
>> not make compiler slower and will not increase compiler build time.
>
> Nor will grow the memory footprint, at least of the important data
> structures, or increase maintanance costs by making the code less readable,
> etc.
There is no reason that use of C++ should increase the memory footprint
of the compiler, make the compiler slower, or make the code less
readable. Poor use of C++ might lead to those things; good use will
not. That is why we need coding standards and patch review.
It is likely that use of C++ will make the compiler build time somewhat
longer since G++ is generally a bit slower than GCC and since parsing
things like the C++ <vector> include file is certainly more expensive
than parsing our own "vec.h". (Precompiled header files may help, of
course.) I would expect that this delta will be quite small in the
scope of a complete compiler bootstrap, especially if you include
building libstdc++ and/or libjava.
As usual, we won't know for sure until we measure.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713