[cfe-dev] FUD in clang vs GCC comparison ?

David Chisnall csdavec at swan.ac.uk
Fri Aug 3 02:46:54 PDT 2012


On 3 Aug 2012, at 09:20, Буров Дмитрий wrote:

> Frankly, after i just reviewed the formal structure of those sentences  
> with that accurately put artificial split, it is harder to me to believe  
> that that wording was chosen unintentionally.

A major part of the design of clang is that it is intended for reuse, for example in IDEs.  This is reflected in both the design, as a set of libraries, and in the license.

I know of clang being used in the following ways, and there are undoubtedly other projects that I am unfamiliar with:

- Other compilers not using LLVM as the back end
- Refactoring tools
- Syntax highlighting
- Code indexing
- FFIs from other language to C / C++
- OpenCL parsing

If you read the paragraph thinking 'clang is a compiler' then you will no doubt experience the incorrect interpretation that spawned this thread.  If you read it understanding what clang actually is, then you would not.  On the very page that you cite and, in fact, in the very section that you are quoting, the second bullet point is:

> Clang is designed as an API from its inception, allowing it to be reused by source analysis tools, refactoring, IDEs (etc) as well as for code generation

In this context, it is clear that the GPL is a problem for these uses.  

The person who wrote this page made the assumption that people would read the bullets in the order that they are written.  If you skip the first ones and then read the later ones in the wrong context, then it is not the author's fault that you misunderstand them.

That's not to say there aren't some slightly FUDish things on that page, most notably they speed comparisons which not only compare an old version of GCC, they also compare Apple GCC, which is significantly slower than FSF GCC.

David



More information about the cfe-dev mailing list