GCC warnings for unused global variables

Paul Koning pkoning@equallogic.com
Thu May 8 22:08:00 GMT 2003


>>>>> "Mike" == Mike Stump <mrs@apple.com> writes:

 Mike> On Friday, May 2, 2003, at 09:43 AM, Gabriel Dos Reis wrote:

 >> What I was saying, as already written in another message, is that
 >> volatile is not a reliable feature to use to write robust code
 >> with reproducible or predictable behaviour.

 Mike> I'd say that volatile is a useful productive and reliable
 Mike> feature of C and C++ compilers and has been for a long time,
 Mike> and that those that don't understand what it is and does,
 Mike> shouldn't work on volatile in the compilers, nor should they
 Mike> write code that uses volatile.  I think we should refrain from
 Mike> frightening users or implementors that want to learn about
 Mike> volatile.  I think statements like the above can frighten naive
 Mike> users, and this is bad.

 Mike> Our job should be to educate users as to what is practically
 Mike> portable, what works, what it means, and to fix any
 Mike> deficiencies in any language standards that can promise more
 Mike> and don't.  We can document in our manual what we think it
 Mike> should mean, if there are grey areas not perfectly clear in the
 Mike> language standard.

 Mike> I don't see the point in scaring users wrt volatile.  I don't
 Mike> see the use in it.

 Mike> I'm much rather you propose wording to add to the gcc manual
 Mike> that states exactly what you think volatile should mean, we can
 Mike> then debate it and agree and put it in, or disagree and try and
 Mike> have you adopt our view.

I agree 100%.

     paul



More information about the Gcc mailing list