From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28363 invoked by alias); 26 Jun 2012 13:15:09 -0000 Received: (qmail 28345 invoked by uid 22791); 26 Jun 2012 13:15:07 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD,URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Jun 2012 13:14:45 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q5QDEGpL017468; Tue, 26 Jun 2012 15:14:16 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q5QDEDae028688; Tue, 26 Jun 2012 15:14:14 +0200 (CEST) Date: Tue, 26 Jun 2012 13:15:00 -0000 Message-Id: <201206261314.q5QDEDae028688@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: tromey@redhat.com, mark.kettenis@xs4all.nl, dje@google.com, pierre.muller@ics-cnrs.unistra.fr, gdb-patches@sourceware.org In-reply-to: <20120622171922.GK2799@adacore.com> (message from Joel Brobecker on Fri, 22 Jun 2012 10:19:22 -0700) Subject: Re: New ARI warning Wed May 23 01:55:03 UTC 2012 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> <20120622171922.GK2799@adacore.com> 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/msg00799.txt.bz2 > Date: Fri, 22 Jun 2012 10:19:22 -0700 > From: Joel Brobecker > > > 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... Oh, there *is* a flag for this? I looked for it but didn't find it... > 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? yes, please