Re: [patch] compiler: clarify ACCESS_ONCE() relies on compiler implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 3, 2013 at 6:52 PM, David Rientjes <rientjes@xxxxxxxxxx> wrote:
>
> The specification here says an access to this volatile quaified pointer is
> implementation defined

.. and my argument is that we don't care about paper standards, we
care about QUALITY OF IMPLEMENTATION.

If a compiler messes up volatile casts, the quality of implementation
is bad. There's just no excuse.

The compiler people can talk about how the paper standard allows it
until the cows come home. Why should we care? The compiler person is
still just making excuses for a bad implementation.

There is no sane alternative semantics to "volatile" that I can come
up with. Seriously. What meaning could "volatile" ever have that would
be sensible and break this?

Now, I do repeat: I don't like volatile. I think it has many problems,
and being underspecified is just one of them (the much deeper problem
is that the C standard attaches it to the data, not to the code, and
we then have to "fix" that by mis-using it as a cast).

So if some improved standard comes along, I'd happily use that. In the
meantime, we don't have any choice, do we? Seriously, you can talk
about paper standards until you are blue in the face, but since there
is no sane alternative to the volatile cast, what's the point, really?

                    Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]