Am 31.05.2010 20:50, schrieb Mark Mitchell:
> Gabriel Dos Reis wrote:
> 
>> Yes, this is the sort of issues I have in mind.  For example, I do not see 
>> how
>> we can use C++ in tree.h without requiring other front-ends to use C++, at 
>> least
>> for the parts that use tree.h.  By components, I meant "for example, is it 
>> the
>> case that the C++ front-end would use C++, but with sufficient care
>> that it can be
>> linked with  the common C codes if the C front-end is not using C++?".
> 
> Yes, I think it's possible for a front-end or a back-end to use C++
> without the rest of the compiler doing so.  I doubt that's where we get
> maximum bang from allowing use of C++, but it could certainly be done.


I think the C -> C++ switch is in terms of compiling GCC an all or
nothing: You need have all of a sudden a C++ compiler for bootstrapping;
otherwise, the middle end and all front ends should be C++ save thanks
to to work of Ian et al. and -Wc++-compat. Thus, you get all the
avantages and disadvantage of C++ and a C++ compiler everywhere.

And as long as the code remains clear to a little-experience C++
compiler (at least, e.g., the middle-end code to which a front end
programmer is exposed), I also do not see a problem for C++. Whether and
to what extend the different parts of the compilers will switch, remains
to be seen. I could imagine that some C++ will slowly creep in everywhere.

Tobias,
who is rather agnostic about the change, but who does not want to see
overloaded operators of the type "+" or "*" (neither in C++ nor in Fortran).

Reply via email to