On Wed, Apr 11, 2012 at 11:11 PM, Miles Bader <mi...@gnu.org> wrote:
> Ian Lance Taylor <i...@google.com> writes:
>>> And GCC usually has better diagnostic than clang except in those few
>>> areas which it does not (those some might say those areas are the most
>>> important ones).
>>
>> No.  clang's diagnostics for C++ are much much better than GCC's.
>> Obviously GCC's can improve, but today clang's are much better.
>
> Meh.  Clang's diagnostics are often pretty good, and it's rightly lauded
> for that, but the "OMG clang totally murders gcc for diagnostics!" meme
> (which seems to be staple of clang's unfortunately large fanboi
> contingent) is an exaggeration.

Yes, the most extreme advocates (of anything) tend to get lost in a
land of exaggeration.

> Clang's diagnostics are not _that_ good,

I'd agree there.

> gcc's are [currently] not that bad,

But for common cases (and a lot of less common ones) they're nowhere
near as good as Clang's...

> and the situations where the
> difference is the most noticeable tend to be obscure.

Here, based on experience, I disagree.  I often have non-experts
mention to me just how surprisingly clear/useful they've found Clang's
error messages (with cause), and that essentially never happened for
gcc's error messages.  There are many common cases where Clang
correctly identifies the user's mistake, and gcc reports something
that is formally correct but much harder to map back to what the user
did wrong.

I don't disagree that gcc's diagnostics have greatly improved, and
seem to continue to do so, but they're still a long way behind.  Which
isn't to say that Clang doesn't have issues -- some fraction of the
time I find Clang's diagnostics to be pretty awful, and I'm so used to
deciphering gcc's messages that I often don't notice how far removed
they are from the underlying problem.

However, this gets dangerously close to thread-jacking, and I don't
want to digress too far into GCC vs Clang comparisons.  The two are
different and have somewhat different goals, and IMO competition is
good for the community overall.

-- James

Reply via email to