GCC warnings for unused global variables

Bruce Korb bkorb@veritas.com
Fri May 2 16:51:00 GMT 2003


Gabriel Dos Reis wrote:

> I think you got my messages wrong.
> 
> 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.

I understood perfectly.  My argument is that even if it is possible
that some other random compiler would choose to eliminate a static volatile,
I seems completely clear that it would not be in the best interests of
simplifying the programming task.  Of all possible choices of what to
do with:

   static volatile char rcsid[] = "xxx";

neither removing it or even warning about it are good choices.



More information about the Gcc mailing list