From patchwork Wed May 16 13:18:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Basile Starynkevitch X-Patchwork-Id: 159636 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]) by ozlabs.org (Postfix) with SMTP id 7B872B6FB4 for ; Wed, 16 May 2012 23:19:10 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1337779150; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=MEUykT8rWeDfxi5d/x2e Rq7x8y0=; b=UiCYy63/4K6hSZBSZP3cKuNjzvaR0nDNJh/6StDE6i09yIV5uSfD UmWyZvyz+GpZHljQp9T6IZYwdHyDCsnIbNghL4Uub5Rw5UGlrr04MB7g5gGzhVzb R0E8ljWettbN9Ns6XwDkLkns2DhoscszMTK0WgEiF12tRySz+JTGUzI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=dIHNiT+/iLFw7DbJswz47bVOfADT/hPMcw05kwsIiSrZ8DG5zIPYbg6QnmGPlv AotOFn72Tr1h4KCzt3jzymt0oBcDCOqQ4ThKcmHGjBmc/l4VD2RodP53XIFRS3Xy xK/ylEBmIQxv/WF886jeN+yTpShjpXCi8CGeRN/bLQqMQ=; Received: (qmail 8155 invoked by alias); 16 May 2012 13:18:54 -0000 Received: (qmail 8056 invoked by uid 22791); 16 May 2012 13:18:52 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_SV X-Spam-Check-By: sourceware.org Received: from smtp-153-wednesday.nerim.net (HELO maiev.nerim.net) (194.79.134.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 May 2012 13:18:37 +0000 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by maiev.nerim.net (Postfix) with ESMTPS id 9CF9C2E025; Wed, 16 May 2012 15:18:33 +0200 (CEST) Received: from basile18 by hector.lesours with local (Exim 4.77) (envelope-from ) id 1SUe7d-0000NR-P6; Wed, 16 May 2012 15:18:33 +0200 Date: Wed, 16 May 2012 15:18:33 +0200 From: Basile Starynkevitch To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Subject: Re: PING PATCH: break lines in announce_function Message-ID: <20120516131833.GA839@ours.starynkevitch.net> References: <20120516124641.GB21919@ours.starynkevitch.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 On Wed, May 16, 2012 at 03:02:39PM +0200, Richard Guenther wrote: > On Wed, May 16, 2012 at 2:46 PM, Basile Starynkevitch > wrote: > > Hello All, > > > > I am pinging the patch http://gcc.gnu.org/ml/gcc-patches/2012-02/msg00474.html > > below for trunk svn 187587 > So - why? I like it the way it is. Because, as I explained in http://gcc.gnu.org/ml/gcc-patches/2012-02/msg00474.html without that patch you have arbitrarily long output lines, and that is unpleasant, in particular when running under gdb or under emacs (also, there may be buffering issues: if GCC misbehave, stderr might not be flushed often enough...) The announce_function is quite rarely really used (because quiet_flag is almost always true), and it is used mostly to debug GCC (or plugins), and in that case having not too large output is quite useful in practice. The patch above is quick & dirty but seems enough. Do you want me to add a comment like /* Hack to avoid very large output lines. */ before? Regards. --- gcc/toplev.c (revision 187587) +++ gcc/toplev.c (working copy) @@ -229,6 +229,11 @@ announce_function (tree decl) { if (!quiet_flag) { + static long count; + count++; + if (count % 8 == 0) + putc('\n', stderr); + if (rtl_dump_and_exit) fprintf (stderr, "%s ", identifier_to_locale (IDENTIFIER_POINTER (DECL_NAME (decl))));