From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12147 invoked by alias); 2 May 2003 10:10:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12140 invoked from network); 2 May 2003 10:10:48 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 2 May 2003 10:10:48 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6/8.12.5) with ESMTP id h42AAmG3001506 for ; Fri, 2 May 2003 12:10:48 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6/8.12.6) with ESMTP id h42AAmJl030692 for ; Fri, 2 May 2003 12:10:48 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6/8.12.6/Submit) id h42AAgOQ030687; Fri, 2 May 2003 12:10:42 +0200 (CEST) Date: Fri, 02 May 2003 10:10:00 -0000 Message-Id: <200305021010.h42AAgOQ030687@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb@sources.redhat.com Subject: Coding style X-SW-Source: 2003-05/txt/msg00014.txt.bz2 Hi folks, I've been noticing that some folks (most notably Andrew :-) have been very "economical" in the use of empty lines in function bodies. I know that the GNU coding standards say that one should not use too many of those, but I think there are good reasons to keep with the tradition of seperating the declaration of local variables from geneuine code by an empty line, e.g.: int max_register_size (struct gdbarch *gdbarch) { struct regcache_descr *descr = regcache_descr (gdbarch); return descr->max_register_size; } instead of: int max_register_size (struct gdbarch *gdbarch) { struct regcache_descr *descr = regcache_descr (gdbarch); return descr->max_register_size; } I keep finding the first much more legible. AFAICT all GNU projects that take the coding standards serious use that style. By the way, using whitespace to logically group lines together within a function body is generally a good idea too. Well, IMHO of course... Anyway, I hope no one will object if add a few extra newlines here'n'there when I feel it's appropriate? Mark