From owner-freebsd-arch@FreeBSD.ORG Wed Aug 31 11:27:31 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 8237416A41F for ; Wed, 31 Aug 2005 11:27:31 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [63.240.76.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A94E43D48 for ; Wed, 31 Aug 2005 11:27:30 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-66-30-115-133.hsd1.ma.comcast.net ([66.30.115.133]) by comcast.net (sccrmhc13) with ESMTP id <20050831112729013004ree2e>; Wed, 31 Aug 2005 11:27:30 +0000 Received: from c-66-30-115-133.hsd1.ma.comcast.net (localhost.127.in-addr.arpa [127.0.0.1]) by c-66-30-115-133.hsd1.ma.comcast.net (8.13.4/8.13.1) with ESMTP id j7VBRPve055406; Wed, 31 Aug 2005 07:27:25 -0400 (EDT) (envelope-from rodrigc@c-66-30-115-133.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-66-30-115-133.hsd1.ma.comcast.net (8.13.4/8.13.1/Submit) id j7VBROrJ055405; Wed, 31 Aug 2005 07:27:24 -0400 (EDT) (envelope-from rodrigc) Date: Wed, 31 Aug 2005 07:27:20 -0400 From: Craig Rodrigues To: Bruce Evans Message-ID: <20050831112720.GA55376@crodrigues.org> References: <20050810005323.GA42721@crodrigues.org> <20050810032308.GA80916@dragon.NUXI.org> <20050827235140.GA3063@crodrigues.org> <20050828172712.T86328@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050828172712.T86328@delplex.bde.org> User-Agent: Mutt/1.5.9i 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: Wed, 31 Aug 2005 11:27:31 -0000 On Sun, Aug 28, 2005 at 05:36:01PM +1000, Bruce Evans wrote: > It should warn about static variable decls iff they are redundant. This > requires determining if the new declaration adds info. I couldn't find > any macros to help determine this, not even ones to say if the new > declaration has an initializer and the old one doesn't. DECL_INITIAL is the macro to tell if a node is part of an initializer or not. I updated the patch to GCC to use DECL_INITIAL and submitted a testcase here: http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01812.html -- Craig Rodrigues rodrigc@crodrigues.org