[RFC] -Wredundant-decls: keep it or remove it?
Craig Rodrigues
rodrigc at crodrigues.org
Thu Sep 1 08:15:34 PDT 2005
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 at crodrigues.org
More information about the freebsd-arch
mailing list