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: [RFC] Switching implementation language to C++


Diego Novillo wrote:

>> By switch, do you using a C++ compiler to compile everything, or that
>> some
>> components may be written only in C++ with sufficient care that they
>> can be
>> linked with other part written in C?
> 
> Ideally, the former.  If we cannot get consensus on that, then I guess
> we'd have to settle for the latter.

I don't think a partial conversion strategy will be very successful.  As
soon as we use C++ in tree.h, we're going to have to use it everywhere.
 And, I suspect that using single inheritance in tree.h is the sort of
change that will cut down on a fair bit of casting, possibly helping us
to invalid conversions.

That doesn't necessarily mean that we have to use lots of C++ features
everywhere.  We can use the C (almost) subset of C++ if we want to in
some places.  As an example, if the Fortran folks want to use C in the
Fortran front-end, then -- except to the extent required by the common
interfaces, those files could read as if they were C code.  But, I think
they'd still need to be compiled with a C++ compiler because they'll
probably pull in headers that use C++ constructs.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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