GCC warnings for unused global variables

Geoff Keating geoffk@geoffk.org
Fri May 2 21:22:00 GMT 2003


> Date: Fri, 2 May 2003 13:12:35 -0700
> From: Richard Henderson <rth@redhat.com>

> On Fri, May 02, 2003 at 11:45:10AM -0400, Paul Jarc wrote:
> > If volatile is used, then the compiler cannot know whether accesses
> > and side effects are needed.  (This is exactly what is expressed by
> > volatile.)  Do you agree or disagree?
> 
> Agree.
> 
> However, I do not agree that "existance" is either an access
> or a side effect.

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.

I will create a patch...

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list