This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC warnings for unused global variables
- From: Joe Buck <jbuck at synopsys dot com>
- To: Kean Johnston <jkj at sco dot com>
- Cc: "'Richard Henderson'" <rth at redhat dot com>, "'Alexander Kabaev'" <kabaev at mail dot ru>, pthomas at suse dot de, ak03 at gte dot com, gcc at gcc dot gnu dot org
- Date: Thu, 1 May 2003 11:09:55 -0700
- Subject: Re: GCC warnings for unused global variables
- References: <20030501173539.GC31113@redhat.com> <004e01c3100a$bfac3fc0$03419384@shrike>
> > I should add that this has already found mistakes, both within gcc
> > itself and in the linux kernel, where some static variable was left
> > stranded when the bit of code it had been associated with was removed,
> > but the variable forgotten.
> >
> > That is exactly the sort of thing I expect this feature to find.
On Thu, May 01, 2003 at 10:54:44AM -0700, Kean Johnston wrote:
> Then by all means, let a user on a bug hunting mechanism turn on
> -Wall -Wunused-static-variables. It helps those users and doesn't
> hinder others. Having it part of -Wall just breaks so much its
> hardly worth it.
I think that Kean's suggestion is the best settlement of this issue.
Kean, would you be willing to contribute a patch to implement this idea?