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: Richard Henderson <rth at redhat dot com>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: 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 09:47:57 -0700
- Subject: Re: GCC warnings for unused global variables
- References: <20030429165657.634a1628.ak03@gte.com> <20030430083713.GU4016@paradies.suse.de> <20030430233243.GM697@redhat.com> <20030430194730.68abe5b4.kabaev@mail.ru> <20030501002107.GP697@redhat.com> <20030501093813.E21602@synopsys.com>
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~