Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: x86: Is 'volatile' necessary for readb/writeb and friends? | Date | Fri, 4 Dec 2009 17:00:39 +0100 |
| |
On Friday 04 December 2009, Segher Boessenkool wrote: > If you want to get all language-lawyery, if the object pointed to by > "addr" is volatile, the volatile here is needed: accessing volatile > objects via a not volatile-qualified lvalue is undefined. But since > this is GCC-specific code anyway, do you care? :-)
I think the real reason for having it is to avoid a warning when device drivers pass volatile objects. Not sure if that's a good thing or if we should better actually warn about it.
Arnd <><
| |