From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21593 invoked by alias); 19 Oct 2012 16:41:49 -0000 Received: (qmail 21376 invoked by uid 22791); 19 Oct 2012 16:41:47 -0000 X-SWARE-Spam-Status: No, hits=-7.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Oct 2012 16:41:37 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9JGfbtE027177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 12:41:37 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9JGfZTf004473; Fri, 19 Oct 2012 12:41:36 -0400 Message-ID: <508182BF.1010206@redhat.com> Date: Fri, 19 Oct 2012 16:41:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Add -Wempty-body to warning set (was: Re: RFC: fix bug in compare_breakpoints) References: <87sj9c28o1.fsf@fleche.redhat.com> <507FC362.5070906@redhat.com> <87lif3y27l.fsf@fleche.redhat.com> <87lif2wi6c.fsf@fleche.redhat.com> In-Reply-To: <87lif2wi6c.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-10/txt/msg00352.txt.bz2 [Changing $subject. As with all warning set addition, this is likely to introduce new -Werror build failures on other hosts/ports.] On 10/19/2012 05:16 PM, Tom Tromey wrote: > Tom> The other problem is caught by -Wempty-body, which we don't enable. It > Tom> yields a number of warnings and would require a coding style change > Tom> from: > [...] > > FWIW, here's the patch. Comments appreciated. > > I do think it is a mild improvement. It is a lot easier to mistype a > ";" than a correctly formatted brace pair. I agree it's a mild improvement. Though I'm surprised at how few cases in common code this reveals -- I thought we had more of: while (...) ; FAOD, this is fine with me. Thanks. -- Pedro Alves