From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23063 invoked by alias); 14 Mar 2011 16:46:08 -0000 Received: (qmail 22881 invoked by uid 22791); 14 Mar 2011 16:46:01 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Mar 2011 16:45:55 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LI200E003OMPB00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Mon, 14 Mar 2011 18:45:52 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.96.116]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LI200EQH3WE7E60@a-mtaout22.012.net.il>; Mon, 14 Mar 2011 18:45:52 +0200 (IST) Date: Mon, 14 Mar 2011 17:17:00 -0000 From: Eli Zaretskii Subject: Re: [RFA-v2] Fix ARI warning about function call in first column In-reply-to: <001401cbe261$5490ec40$fdb2c4c0$%muller@ics-cnrs.unistra.fr> To: Pierre Muller Cc: tromey@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83oc5dr6pj.fsf@gnu.org> References: <20110312015329.GA20179@sourceware.org> <010f01cbe157$aebb5cb0$0c321610$%muller@ics-cnrs.unistra.fr> <18667.385276831$1300008680@news.gmane.org> <001401cbe261$5490ec40$fdb2c4c0$%muller@ics-cnrs.unistra.fr> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00735.txt.bz2 > From: "Pierre Muller" > Cc: > Date: Mon, 14 Mar 2011 17:03:16 +0100 > > Eli, this still leaves us with two > cases for which we either have > TYPE > NAME (PARAMS); > or > TYPE NAME (PARAMS); > with a single line that exceeds 80 columns. I see no problem with long lines, if there are no better alternatives. I generally dislike tools that raise warnings for perfectly valid and readable code, and I don't think we must every follow minor stylistic rule when that rule gives sub-optimal results. But it sounds like I'm the only one (again). So I give up: do whatever you and others think is right, and I will crawl back under my rock. > I didn't really understand your comment about > automatic indenting by emacs because I never used emacs :( In Emacs, hitting the TAB key anywhere on a line of code reindents this line according to the current setting of the coding style. The default coding style is, not surprisingly, the GNU coding style described in standards.texi. So, when you hit TAB in a C source file on the second of the two lines that say TYPE NAME (PARAMS); Emacs reindents it like this: TYPE NAME (PARAMS); You can also re-indent a whole region of source in Emacs, by marking the region and pressing TAB. This is a very convenient way of reformatting a large portion of code according to GNU standards (which mostly happen to be GDB standards as well). When you re-indent a large region like that, it is easy to undo the kind of formatting you want to enforce, shown above, because you will not generally go back and examine each line of the reformatted region -- you trust Emacs to DTRT. The net result will be, I fear, that such reformatting will inadvertently undo the indentation of prototypes, and trigger ARI warnings for no good reason. I hope I made myself clear this time.