[RFC] -Wredundant-decls: keep it or remove it?

David O'Brien obrien at freebsd.org
Wed Aug 10 05:56:21 GMT 2005


On Tue, Aug 09, 2005 at 08:53:23PM -0400, Craig Rodrigues wrote:
> It is illegal in ISO C to declare a struct as extern (implying external
> linkage) , and then declare it as static (implying internal linkage).
..
> OPTION 2:
> Forward declare routedomain as static, but remove -Wredundant-decls
> from kernel makefiles:
> static struct domain routedomain;
> ....
> static struct domain routedomain = {  ..... }
> 
> For OPTION 2, it is necessary to remove -Wredundant-decls
> because you will get a new compiler warning:
> 
> warning: redundant redeclaration of 'routedomain'
> warnig: previous declaration was here ...

This is a GCC bug that I am working to get fixed.
 
-- 
-- David  (obrien at FreeBSD.org)


More information about the freebsd-arch mailing list