Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Aug 2005 20:23:08 -0700
From:      "David O'Brien" <obrien@freebsd.org>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [RFC] -Wredundant-decls: keep it or remove it?
Message-ID:  <20050810032308.GA80916@dragon.NUXI.org>
In-Reply-To: <20050810005323.GA42721@crodrigues.org>
References:  <20050810005323.GA42721@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org)



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