Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2005 07:27:20 -0400
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [RFC] -Wredundant-decls: keep it or remove it?
Message-ID:  <20050831112720.GA55376@crodrigues.org>
In-Reply-To: <20050828172712.T86328@delplex.bde.org>
References:  <20050810005323.GA42721@crodrigues.org> <20050810032308.GA80916@dragon.NUXI.org> <20050827235140.GA3063@crodrigues.org> <20050828172712.T86328@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050831112720.GA55376>