This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: volatile [was: GCC warnings for unused global variables]


On 03-May-2003, Michael Eager <eager@eagercon.com> wrote:
> An unreferenced volatile variable has no reads or writes which need to be
> represented.

I don't agree.  In C++, if the variable is static, it is first
zero-initialized, which is a write that needs to be represented,
and then if there is an initializer for it, it is initialized with
that value, which is another write that needs to be represented.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]