From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10298 invoked by alias); 12 Apr 2012 06:22:35 -0000 Received: (qmail 10287 invoked by uid 22791); 12 Apr 2012 06:22:33 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Apr 2012 06:22:19 +0000 Received: by iaag37 with SMTP id g37so2490062iaa.20 for ; Wed, 11 Apr 2012 23:22:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.186.161 with SMTP id fl1mr1092065igc.44.1334211739281; Wed, 11 Apr 2012 23:22:19 -0700 (PDT) Received: by 10.231.46.6 with HTTP; Wed, 11 Apr 2012 23:22:19 -0700 (PDT) In-Reply-To: <87obqxmqc1.fsf@catnip.gol.com> References: <4F7B356E.9080003@google.com> <4F7C35A3.3080207@codesourcery.com> <20120410084614.GJ6148@sunsite.ms.mff.cuni.cz> <1334078968.11195.64.camel@triegel.csb> <1334149073.3101.23.camel@triegel.csb> <87obqxmqc1.fsf@catnip.gol.com> Date: Thu, 12 Apr 2012 06:22:00 -0000 Message-ID: Subject: Re: Switching to C++ by default in 4.8 From: James Dennett To: Miles Bader Cc: Ian Lance Taylor , Andrew Pinski , Xinliang David Li , Richard Guenther , Torvald Riegel , Michael Matz , Jakub Jelinek , Bernd Schmidt , Gabriel Dos Reis , David Edelsohn , Diego Novillo , gcc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00470.txt.bz2 On Wed, Apr 11, 2012 at 11:11 PM, Miles Bader wrote: > Ian Lance Taylor 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. =A0clang's diagnostics for C++ are much much better than GCC's. >> Obviously GCC's can improve, but today clang's are much better. > > Meh. =A0Clang'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. >=A0Clang'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