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: "Kean Johnston" <jkj at sco dot com>
- To: "'Geoff Keating'" <geoffk at geoffk dot org>, <rth at redhat dot com>
- Cc: <gdr at integrable-solutions dot net>, <fjh at cs dot mu dot OZ dot AU>,<jbuck at synopsys dot com>, <espie at quatramaran dot ens dot fr>, <gcc at gcc dot gnu dot org>
- Date: Fri, 2 May 2003 21:27:00 -0700
- Subject: RE: GCC warnings for unused global variables
- Organization: The SCO Group
> 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).
Kean