GCC warnings for unused global variables
Geoff Keating
geoffk@geoffk.org
Sat May 3 08:04:00 GMT 2003
> X-Original-To: geoffk@foam.wonderslug.com
> From: "Kean Johnston" <jkj@sco.com>
> Cc: <gdr@integrable-solutions.net>, <fjh@cs.mu.OZ.AU>, <jbuck@synopsys.com>,
> <espie@quatramaran.ens.fr>, <gcc@gcc.gnu.org>
> Date: Fri, 2 May 2003 21:27:00 -0700
> Organization: The SCO Group
> X-Priority: 3 (Normal)
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> Importance: Normal
> X-OriginalArrivalTime: 03 May 2003 04:37:15.0533 (UTC) FILETIME=[AC1DA3D0:01C3112D]
> X-MIME-Autoconverted: from quoted-printable to 8bit by desire.geoffk.org id h434cdn13707
>
> > It's implementation-defined what is an 'access'.
> >
> > It looks like it's useful to define initialization as an 'access', for
> > exactly this case: rcsid, or in general magic code that looks at
> > object files. So, let's do that.
> Careful.
>
> If you mark initialization as access, and that makes the warnings go
> away, we'd lose some considerable value to the warning. Just because
> this rcsid is such a PITA, doesn't mean it shouldbe be warned about
> if that's what the user wants, but since its initialized, if that makes
> the warning go away that's bad. Same for any other variable that's
> initialzied but not used (in static scope of course).
This would only be for volatile initialized static variables, not the
general case.
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc
mailing list