Posted Aug 16, 2012 14:52 UTC (Thu) by quanstro (guest, #77996)
In reply to: ACCESS_ONCE() by nye
Parent article: ACCESS_ONCE()
i agree with what you say, but that's not the point i'm trying to make.
(and btw, i don't think that ACCESS_ONCE is standard c. nor can the
kernel be compiled with an arbitrary compiler; it depends on gcc.)
for me, making code safe from all possible according-to-hoyle legal
transformations of the code is not really interesting or useful.
i'd much rather focus on having a tractable, easy-to-use programming
environment.
if restricting the compiler from making some theoretically legal
code transformations reduces bugs and generally makes life easier,
then why not do it?
as it is i believe there are some gcc optimizations that can break the
kernel.