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: Switching to C++ by default in 4.8


On 4/4/12 8:04 AM, Richard Guenther wrote:

I agree for the idea of converting all of GCC to C++ (whatever that means).

Right. The conversion that does happen, can be gradual. One other big advantage I see in this effort, is the transition to commonly used programming idioms and patterns. This will lower barriers of entry to new developers, which is crucial to the long term survival of the project. I've heard many new developers (experienced compiler developers even) express frustration at the obtuse and obscure patterns they find in GCC.


I disagree for the part making the internal infrastructure easier to use,
understand and maintain.  Which means targeting mostly isolated sub-systems,
like vec.h (and other various containers), double-int.[ch] (and other various
way of representing and working with constants).  Making tree or gimple a
C++ class with inheritance and whatever is indeed a huge waste of time
and existing developer ressources (that, if only because they have to adapt
and maintain two completely different code-bases over some time).

I expect the GCC core to maintain written in C, compiled by C++.

I'm not sure about that long term, but I agree that this will likely be true for several releases. We want to be careful, of course. Particularly with the core sub-systems.


I also find debugging C++ in gdb somewhat more annoying than debugging
plain C, and at the moment I always go back to a stage1 compiler.

Indeed - I'd be worried if my debugging efficiency decreases by more than 5%.

We should take this opportunity to help improve gdb by filing bugs.



Diego.



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