17

I had heard once that due to the complexity of C++ there where only 2 or 3 unique C++ compilers in the world and that all other available compilers used one of those at its core. Is this true, and if so what are the "actual" C++ compilers.

EDIT

To clarify: I'm specifically referring to the "core" of the compiler, I guess what you might call the "frontend". I'm definitely NOT referring to IDE's or "suites".

EDIT

I did a quick search on C++ frontend vendor and came up with:

clang

Semantic Designs

Edison Design Group

Clearly there are more than 3 C++ frontends, but I'd still like to know how many there are and to the extent possible which popularly available compilers use third party frontends.

13

Here are some that I think are not derivatives of each other:

  • Sun Studio
  • IBM XLC
  • Portland
  • Intel ICC
  • GCC
  • clang
  • Microsoft Visual C++
  • Borland

Edited to note: The Portland Group compiler turns out to use the same front-end (from Edison Design Group) as Intel ICC. Thanks to Robert Barnes for pointing this out.

7

There are definitely more than three C++ compilers, but nowhere near the number of C compilers. Some that I have used:

There is a partial list of C/C++ compilers here - quite a few of them support C++ and most are/were developed mostly independently of each other.

It should be noted that many Unix vendors have historically developed their own C++ compiler, with various degrees of standards conformance. Quite often it was a souped-up version of their C compiler for the same platform.

4

I can think of at least 4 different ones:

  • GCC/G++
  • Microsoft Visual C++
  • EDG (I believe this is used in Intel's compiler and in Comeau's, but I could be wrong)
  • LLVM/Clang

and there are probably a few more that aren't based on others.

But you're right, building a C++ compiler from scratch is a huge task, and it is pretty common to base it on an existing one, rather than developing everything yourself.

1

No. gcc, llvm, MS C++, Intel C++, Borland C++, Metrowerks CodeWarrior come from different codebases.

1

ARMCC also is unique I believe.

1

Digital Mars C++ by Walter Bright is definitely a separate code base.

http://www.digitalmars.com