[$] Calibrating your fear of big bad optimizing compilers As noted
earlier,
when compiling Linux-kernel code that does a plain C-language load or
store, as in
"
a=b", the C standard grants the compiler the right
to assume that the affected variables are neither accessed nor modified
by any other thread at the time of that load or store.
The compiler is therefore permitted to carry out a surprisingly
large number of optimizations, any number of which might ruin your
concurrent code's day.
Given that current compilers usually do not emit diagnostics warning of
potential ruined days, it would be good to have other tools take on this
task.