This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC warnings for unused global variables
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.