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

Craig Rodrigues rodrigc at crodrigues.org
Wed Aug 31 11:27:31 GMT 2005


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 at crodrigues.org


More information about the freebsd-arch mailing list