Clang vs Other Open Source Compilers

Building an entirely new compiler front-end is a big task, and it isn't always clear to people why we decided to do this. Here we compare Clang and its goals to other open source compiler front-ends that are available. We restrict the discussion to very specific objective points to avoid controversy where possible. Also, software is infinitely mutable, so we don't talk about little details that can be fixed with a reasonable amount of effort: we'll talk about issues that are difficult to fix for architectural or political reasons.

The goal of this list is to describe how differences in goals lead to different strengths and weaknesses, not to make some compiler look bad. This will hopefully help you to evaluate whether using Clang is a good idea for your personal goals. Because we don't know specifically what you want to do, we describe the features of these compilers in terms of our goals: if you are only interested in static analysis, you may not care that something lacks codegen support, for example.

Please email cfe-dev if you think we should add another compiler to this list or if you think some characterization is unfair here.

Clang vs GCC (GNU Compiler Collection)

Pro's of GCC vs Clang:

Pro's of Clang vs GCC:

Clang vs Elsa (Elkhound-based C++ Parser)

Pro's of Elsa vs Clang:

Pro's of Clang vs Elsa:

Clang vs PCC (Portable C Compiler)

Pro's of PCC vs Clang:

Pro's of Clang vs PCC: