Re: [RFC/PATCH] doc: volatile considered evil

David Rientjes
2007-05-08T19:19:26Z

On Tue, 8 May 2007, Randy Dunlap wrote:

> [well, can be turned into a patch]
>
> Here are some 'volatile' comments from Linus, extracted from
> several emails in at least 2 threads.
>
> If this is close to useful, we can add it to Documentation/.
>
> ===============================================================
>
> ***** "volatile" considered useless and evil: Just Say NO! *****
>
> Do not use the C-language "volatile" keyword
> (extracted from lkml emails from Linus)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>

Since 'volatile' has two different semantics depending on the context in
which it is used, this warning should be appended to include the fact that
it is legitimate to use for inline assembly.