Re: [patch] spinlocks: remove 'volatile'

Linus Torvalds
2006-07-08T21:43:57Z

On Sat, 8 Jul 2006, Pavel Machek wrote:
>
> Actually, because volatile is big hammer, it can be used to work
> around compiler bugs. If compiler dies at internal error in function
> foo, just sprinkle few volatiles into it, and you can usually work
> around that compiler problem.

Heh. That's probably an even better use of "volatile" than using it for
hiding bugs in the sources. The bugs in the sources you'd be better off
just _fixing_, while the compiler problems you may have a much harder time
working around..

Linus