[cfe-dev] Chrome/mac is all-clang, all-the-time

Matthieu Monrocq matthieu.monrocq at gmail.com
Tue Nov 1 04:35:17 PDT 2011


Le 1 novembre 2011 00:03, Miles Bader <miles at gnu.org> a écrit :

> 2011/11/1 Chandler Carruth <chandlerc at google.com>:
> > I'm really sorry that came off as condescending, it wasn't meant to be.
> The
> > cost imposed by switching to Clang's error messages was one we took very
> > seriously. Working with GCC for a long time isn't a negative statement
> about
> > the developer, it's a simple reality given the long history GCC has in
> the
> > open source community as essentially the only compiler option available.
>
> Er, well you basically divided your user base into two categories:
> those who eagerly embraced clang, and those who were too
> dim/rigid/inexperienced to appreciate it -- with what seems to be the
> implication that anybody in the former group _must_ be in the latter.
> That's veering pretty close to True Scotsman territory...
>
> While I'm sure both types of user are present, I suspect that you're
> omitting another group:  those who don't really care so much either
> way -- especially amongst those whose compiler usage doesn't usually
> tickle the particularly egregious cases (e.g. C developers -- like
> Gnome! -- and C++ devs who aren't pushing boundaries with templates),
> and developers who are experienced enough (as I imagine most google
> devs to be!) that they aren't particularly bothered by the specific
> wording of error messages...
>
> Again, I don't want to seem like I'm speaking _against_ clang -- I'm
> not, I use it, and I like it -- and clang certainly does generally
> have pretty clear error messages.  But there seems to be this idea
> floating around that gcc's error messages are unusably bad, and that
> clang's are in a completely different class, and _that_ I just don't
> see.
>
> [I should note, btw, that gcc is developed too -- and that includes
> improving the error messages, and compilation speed...]
>
> -miles
>
> --
> Cat is power.  Cat is peace.
>
>
Hello,

I think you misunderstood Chandler's statement here. From the way I read it
(but then, I am a French speaker first and foremost...) it seemed to me
that some people were rightly concerned about the lack of productivity that
would result from having to learn the "clang" way. I think it's a valid
concern.

Personally, I have been using Clang at home for a while, and gcc at work
(company policy) and I will fully admit that despite my real interest in
Clang and its definitely better diagnosis, I am simply more used to gcc's
diagnostics and thus more adept at deciphering them, no matter how arcane
they may appear to a beginner...

Another interesting point though, for the switch, is the performance of the
resulting binary. Development is one thing, and we have a lot of tools at
our disposal to help out: compiling with both Clang and gcc with warnings
on certainly help catch a lot of errors, static analysis is quite useful as
well, debug builds etc... However when pushing software to a server, we
still want to heck out as much speed and as few memory as we can from it.

As far as I know, gcc still has the lead here (but then the only serious
benchmarks I saw were from phoronix, and it was a while ago). I seem to
remember that LLVM was more adept for numerical computation, but it's of
little interest to me (and my company). If someone had accurate figures
Clang 3.0 / gcc 4.7, it would be interesting to see how it falls out now.

--Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111101/2b7363e3/attachment.html>


More information about the cfe-dev mailing list