Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2005 11:15:31 -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:  <20050901151531.GA43623@crodrigues.org>
In-Reply-To: <20050831215640.S1678@epsplex.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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 31, 2005 at 10:32:08PM +1000, Bruce Evans wrote:
> This seems reasonable.  Is it necessary to check TREE_PUBLIC ()
> explicitly?  We have already avoided warning for externs, so only
> 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.

-- 
Craig Rodrigues        
rodrigc@crodrigues.org



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