From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28867 invoked by alias); 19 Oct 2012 16:44:00 -0000 Received: (qmail 28833 invoked by uid 22791); 19 Oct 2012 16:43:58 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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:43:52 +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 q9JGhqwd028040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 12:43:52 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9JGhpfV004939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 19 Oct 2012 12:43:51 -0400 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: Add -Wempty-body to warning set References: <87sj9c28o1.fsf@fleche.redhat.com> <507FC362.5070906@redhat.com> <87lif3y27l.fsf@fleche.redhat.com> <87lif2wi6c.fsf@fleche.redhat.com> <508182BF.1010206@redhat.com> Date: Fri, 19 Oct 2012 16:44:00 -0000 In-Reply-To: <508182BF.1010206@redhat.com> (Pedro Alves's message of "Fri, 19 Oct 2012 17:41:35 +0100") Message-ID: <876266wgxk.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/msg00353.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> [Changing $subject. As with all warning set addition, this is likely Pedro> to introduce Pedro> new -Werror build failures on other hosts/ports.] Thanks. Pedro> I agree it's a mild improvement. Though I'm surprised at how few cases Pedro> in common code this reveals -- I thought we had more of: Pedro> while (...) Pedro> ; I was surprised, too, but then I read that 'while' is explicitly excluded from the warning: `-Wempty-body' Warn if an empty body occurs in an `if', `else' or `do while' statement. This warning is also enabled by `-Wextra'. Pedro> FAOD, this is fine with me. Thanks. I'm going to wait for more comments. Tom