GCC warnings for unused global variables

Joe Buck jbuck@synopsys.com
Thu May 1 19:57:00 GMT 2003


> > 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?



More information about the Gcc mailing list