This is the mail archive of the
mailing list for the GCC project.
Re: Optimization of conditional access to globals: thread-unsafe?
From: "Dave Korn" <firstname.lastname@example.org>
Date: Mon, 29 Oct 2007 01:05:06 -0000
> "My way is right and everyone else's is wrong".
I didn't say that. I said that what users do on a broad scale is an
important consideration that often trumps paper standards. And yes,
users as well as the implementors themselves do in fact get to be a
part of making that determination.
Standards are also not infallible laws that should be followed
More importantly, you cannot break things on people out of mere
The paper standards don't matter if that's not what people actually
do. Nobody marks all of their thread and signal accessed shared
variables as volatile, and telling them to do so does not solve the
problem. Rather, it just infuriates those users.
Find me one OS kernel code base written in the C language that marks
all lock protected variables as volatile? And no you cannot cop out
from this obvious example merely by saying that none of them are truly
written in the "C language."
Again, standards should be strongly questioned when they do not
acknowledge and co-exist with wide spread existing practice.
> Better write your own compiler then.
If this becomes the common attitude of GCC developers, you can pretty
much guarentee this will drive people to work on LLVM and other
alternative compiler code bases.