GCC warnings for unused global variables

Richard Henderson rth@redhat.com
Thu May 1 16:50:00 GMT 2003


On Thu, May 01, 2003 at 09:38:13AM -0700, Joe Buck wrote:
> > Then you'll have to ignore the warning.
> 
> Then we should take OUT the bleeping warning.  It wasn't there before.
> It is a regression.

It is not a regression.  I said "ignore" because he also said
"he couldn't modify the source".  The REAL way to get rid of 
the warning is to mark the thing __attribute__((unused)).

Or even better, __attribute__((used)).  If he fails to do this,
then at some point GCC will stop emitting that variable to the
object file entirely, precisely because it isn't used.

This would be considered a feature for any other variable,
and I can't stomach making bletcherous special cases for a 
variable named "rcsid".


r~



More information about the Gcc mailing list