On Tue, Dec 17, 2013 at 06:51:49PM +0100, Samuel Thibault wrote:
> I don't think we benefit very much here, do we?  restrict is a very
> difficult thing to maintain, few programmers really understand what it
> means, I'd rather avoid introducing too many of them.

I agree. Note that GNU Mach is built with -fno-strict-aliasing exactly
for such reasons, as are other well known projects. Besides, the
restrict keyword is only really useful when you have more than one
pointer of the same type, since strict aliasing would already apply for
pointers of different types. And as you mention it, the lock semantics
are actually what matter most here with regard to code ordering, and
they actually reduce the effectiveness of optimizations.

-- 
Richard Braun

Reply via email to