From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26180 invoked by alias); 22 Jun 2012 17:19:47 -0000 Received: (qmail 26169 invoked by uid 22791); 22 Jun 2012 17:19:45 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Jun 2012 17:19:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DA5791C6197; Fri, 22 Jun 2012 13:19:29 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sXa5TxQErAun; Fri, 22 Jun 2012 13:19:29 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6853E1C613D; Fri, 22 Jun 2012 13:19:29 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id CEE26145616; Fri, 22 Jun 2012 10:19:22 -0700 (PDT) Date: Fri, 22 Jun 2012 17:19:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Mark Kettenis , dje@google.com, pierre.muller@ics-cnrs.unistra.fr, gdb-patches@sourceware.org Subject: Re: New ARI warning Wed May 23 01:55:03 UTC 2012 Message-ID: <20120622171922.GK2799@adacore.com> References: <20120523015503.GA25312@sourceware.org> <4fbc9d77.0853b40a.641e.ffff90dbSMTPIN_ADDED@mx.google.com> <87bold8l4d.fsf@fleche.redhat.com> <201205282043.q4SKhksB010254@glazunov.sibelius.xs4all.nl> <87ipejib8o.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ipejib8o.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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-06/txt/msg00720.txt.bz2 > Mark> So I'd have no objection to requiring C99, except for one > Mark> style-related issue. I really, really hate mixing declarations with > Mark> code (something that C99 started to allow). So if we switch to > Mark> requiring C99, I think we should add a rule to the coding standards > Mark> that variables may only be declared at the start of a block. > > If there is no warning for it, then uses will slip in. Here is a patch that adds -Wdeclaration-after-statement to the list of compiler warnings... Tested on x86_64-linux by rebuilding the native compiler with --enable-targets=all. gdb/ChangeLog: * configure.ac (build_warnings): Add -Wdeclaration-after-statement. * configure: Regenerate. OK to commit? Thanks, -- Joel