NewsAllowing C++ in GCC, the GNU Compiler Collection

Allowing C++ in GCC, the GNU Compiler Collection content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

On Sunday, the Free Software Foundation announced that C++ will now be allowed in the open source GCC codebase.

Mark Mitchell, GCC’s Release Manager and GCC Steering Committee member, said, “I am pleased to report that the GCC Steering Committee and the FSF have approved the use of C++ in GCC itself. Of course, there’s no reason for us to use C++ features just because we can. The goal is a better compiler for users, not a C++ code base for its own sake.”

But before everyone starts throwing C++ at the GCC codebase, some ground rules are in order. Mitchell said that the C++ features permitted in GCC should be small so that developers not familiar with C++ are not overwhelmed by a major change in the codebase.

“I think it goes without question that at this point we arelimiting ourselves to C++98 (plus “long long” so that we have a 64-bit integer type); C++0x features should not be used. Using multiple inheritance, templates (other than when using the C++ standard library, e.g. std::list), or exceptions also seems overly aggressive to me. We should use features that are relatively easy for C programmers to understand and relatively hard for new C++ programmers to misuse,” Mitchell said, “For example, I think constructors and destructors are pretty easy and hard to misuse.”

Mitchell is looking for someone who can lead the effort to develop a C++ coding standards wiki for GCC.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories