From patchwork Fri Apr 12 07:18:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 235977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 78F9D2C0099 for ; Fri, 12 Apr 2013 17:19:04 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=yCRzfnb9MiHSmFdtM FsCProjEYI8XLn1QMXS/fGi19ws/aqO7Fcbd8/YLkEQGyoyYx9MFW0Ss6QvPBD3z qk7G2U/JaOxmUa28t7P1MlATOpVf+ZTalUtFcszvxITeKqgcK3GuZkfI7neJ/124 D/hKeUoaqnMy6lMlUP6I0U2dhE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=7H9Xme+JmiicP0TJUIC3MXn mkKU=; b=a+2l9K8qH2ncEV5+tlvJ/3i+tPOGBmYrKcdaMzwhK4WHwyBa7p87x2g M7uxakIHutvEGrI71jUDbUedhWvZqsZ6UyHeaAJmdMYLd95ZwcYYNeeoudZlGvLR /4mylB+ML85BJrATSBwzcNQxw3ec0szxb+Uw8vONhJj0VyZuTlvQ= Received: (qmail 30047 invoked by alias); 12 Apr 2013 07:18:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 30036 invoked by uid 89); 12 Apr 2013 07:18:57 -0000 X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 12 Apr 2013 07:18:57 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3C7Ittl020996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 12 Apr 2013 03:18:55 -0400 Received: from zalov.cz (vpn-54-117.rdu2.redhat.com [10.10.54.117]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3C7IrJn031401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Apr 2013 03:18:54 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r3C7IpaG002055; Fri, 12 Apr 2013 09:18:52 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r3C7InZO002054; Fri, 12 Apr 2013 09:18:49 +0200 Date: Fri, 12 Apr 2013 09:18:48 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: Manuel =?iso-8859-1?B?TPNwZXotSWLh8WV6?= , Gcc Patch List Subject: Re: RFC: color diagnostics markers Message-ID: <20130412071848.GV16463@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20130408144359.GP20334@tucnak.redhat.com> <20130408190620.GQ20334@tucnak.redhat.com> <20130411055557.GI16463@tucnak.redhat.com> <20130411152607.GP16463@tucnak.redhat.com> <51673DB7.3030608@net-b.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <51673DB7.3030608@net-b.de> User-Agent: Mutt/1.5.21 (2010-09-15) On Fri, Apr 12, 2013 at 12:48:23AM +0200, Tobias Burnus wrote: > Gabriel Dos Reis wrote: > >Patch OK. > > I am not sure whether I have seen the latest patch, but in the one I > saw there is a typo in the .texi text: > > +only when the stdandard error is a terminal. The forms > > "standard" Fixed, plus fixed 4 remaining GREP_COLORS occurrences to GCC_COLORS, committed. Note that I haven't touched the Fortran frontend, which doesn't use the standard diagnostics routines, so you might want to consider colorizing similarly Fortran FE caret, locus, error:/warning: etc. keywords. > Thanks for the patch, I think it can be quite useful. > > Tobias > > PS: Please also update the GCC 4.9 release notes. Done thusly, took time to translate the colors/bold/quotes into HTML, hope it shows up nicely in all browsers, tried just firefox and elinks. Jakub --- gcc-4.9/changes.html 10 Apr 2013 17:29:50 -0000 1.3 +++ gcc-4.9/changes.html 12 Apr 2013 07:13:01 -0000 @@ -31,9 +31,31 @@ --> - +

C family

+ +
    +
  • Support for colorizing diagnostics emitted by GCC has been added. + The -fdiagnostics-color=auto will enable it when + outputting to terminals, -fdiagnostics-color=always + unconditionally. The GCC_COLORS environment variable + can be used to customize the colors or disable coloring.
    + Sample diagnostics output:
    +
    +    $ g++ -fdiagnostics-color=always -S -Wall test.C
    +    test.C: In function ‘int foo()’:
    +    test.C:1:14: warning: no return statement in function returning non-void [-Wreturn-type]
    +     int foo () { }
    +                  ^
    +    test.C:2:46: error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) instantiating ‘struct X<100>’
    +     template <int N> struct X { static const int value = X<N-1>::value; }; template struct X<1000>;
    +                                                  ^
    +    test.C:2:46:   recursively required from ‘const int X<999>::value’
    +    test.C:2:46:   required from ‘const int X<1000>::value’
    +    test.C:2:88:   required from here
    +
    +    test.C:2:46: error: incomplete type ‘X<100>’ used in nested name specifier
    +    
  • +