From owner-freebsd-arch@FreeBSD.ORG Sun Sep 4 18:28:22 2005 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EE6116A41F for ; Sun, 4 Sep 2005 18:28:22 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3F1743D48 for ; Sun, 4 Sep 2005 18:28:21 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j84ISHwB019707; Mon, 5 Sep 2005 04:28:17 +1000 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j84ISFlE030706; Mon, 5 Sep 2005 04:28:16 +1000 Date: Mon, 5 Sep 2005 04:28:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Craig Rodrigues In-Reply-To: <20050901151531.GA43623@crodrigues.org> Message-ID: <20050905042755.F10844@delplex.bde.org> References: <20050810005323.GA42721@crodrigues.org> <20050810032308.GA80916@dragon.NUXI.org> <20050827235140.GA3063@crodrigues.org> <20050828172712.T86328@delplex.bde.org> <20050831112720.GA55376@crodrigues.org> <20050831215640.S1678@epsplex.bde.org> <20050901151531.GA43623@crodrigues.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@FreeBSD.org Subject: Re: [RFC] -Wredundant-decls: keep it or remove it? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2005 18:28:22 -0000 On Thu, 1 Sep 2005, Craig Rodrigues wrote: > On Wed, Aug 31, 2005 at 10:32:08PM +1000, Bruce Evans wrote: >> weird cases are left. I can't see any reason not to use simply: >> >> /* Don't warn about a definition following a declaration. */ >> if (DECL_INITIAL (newdecl) && !DECL_INITIAL (olddecl))) >> >> since a definition (i.e., a declaration with an initializer) following >> a declaration (i.e., a tentative definition) can never be redundant. > > > I think you are right. I submitted a modified patch based on what you > suggested here: > http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00006.html > > and got approval for it on the GCC mainline here: > http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00019.html > > I'll try to get it into GCC soon. Thanks. Bruce