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: Using C++ in GCC is OK


Rich Wallick <rwallick@gmail.com> writes:

>   I hope you don't mind my comment as I an not a project member, just a
> long term multi-platform GCC user.  With all due respect, I fail to
> understand the decision to switch to C++ without being able to elucidate
> the specific features of C++ that will benefit the GCC team and the GCC
> compiler collection.  It seems to me that outlining the specific
> advantages to both the compiler and development team of using C++ over
> C  would be step one in defining what is and is not to be allowed. (I'm
> sure there is such a document, but I haven't been able to find it.)

Here are the slides from my presentation on the topic at the 2008 GCC
Summit: http://airs.com/ian/cxx-slides.pdf .


>   To begin, what are the specific reasons or advantages for switching
> to C++  for the GCC compiler?

See above slides for my summary.

> Will C++ produce faster or more efficient
> code and if so how and using what specific constructs?

Using C++ in the compiler will not produce faster or more efficient
generated code.  In some cases it should make the compiler itself run
more efficiently, as when using STL sort rather than qsort.

> Will using C++
> produce less buggy code and, again, if so how and using what specific
> constructs.

My hope is that using C++ in the compiler should help make the
compiler itself less buggy, in particular in areas related to memory
use.


>   One final note: it is my experience that having developers not using
> the tool/product they are developing reduces product quality
> dramatically.  For the one cent my two cents is worth, the C front end
> should be written in C, the C++ front end should be written in C++ and
> so forth.

I do hope that writing gcc in C++ will increase the performance of the
C++ frontend.  I'm skeptical that it will have any negative effect on
the C frontend.

Ian


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