From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11636 invoked by alias); 25 Apr 2012 18:26:09 -0000 Received: (qmail 11593 invoked by uid 22791); 25 Apr 2012 18:26:08 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Apr 2012 18:25:54 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SN6uX-0006p6-D2 from Maciej_Rozycki@mentor.com ; Wed, 25 Apr 2012 11:25:53 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 25 Apr 2012 11:25:52 -0700 Received: from [172.30.0.84] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 25 Apr 2012 19:25:51 +0100 Date: Wed, 25 Apr 2012 18:27:00 -0000 From: "Maciej W. Rozycki" To: Joel Brobecker CC: Subject: Re: [PATCH] microMIPS support In-Reply-To: <20120425171818.GK10958@adacore.com> Message-ID: References: <20120425152847.GG10958@adacore.com> <20120425171818.GK10958@adacore.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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: 2012-04/txt/msg00879.txt.bz2 On Wed, 25 Apr 2012, Joel Brobecker wrote: > > Actually I keep getting confused about the style expected for aggregate > > types, especially in the context of initialisers. So for example is this > > correct: > [...] > > or should that be written yet differently? What if that's defined at the > > file scope: > > Yeah, I am not sure what the proper kosher style would be in this case, > or if this has been discussed and decided, but I would tend to say that > the same style should be used regardless of scope. I am unconvinced. We make an exception for global functions and do not indent their brackets. However we do indent nested (local) functions. Have a look at elf/dl-deps.c in glibc sources (that follow the same style that we do) for an example -- there's a nested "preload" function in "_dl_map_object_deps" and its indented just as any other entity would be (personally I would find an unindented nested block confusing). So why should we treat all the other kinds of entities differently? What's the rationale? I think all file-scope entities look better unindented, not just functions. That's my personal view anyway, feel free to differ. Though I have to admit my view is not particularly strong here and then TBH file-scope structures in the glibc source referred above are indeed indented, so I am not going to argue either way if there's any doubt. Maciej