Subject: Re: USB stack needs early review (Re: Someone should fix our USB stack...)
To: Vincent <10.50@free.fr>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 03/22/2007 14:18:20
On Mar 22, 2007, at 1:27 PM, Vincent wrote:

> Jason Thorpe wrote:
>
>> No, the compiler is not allowed to keep cached in a register a  
>> memory access across a function call, precisely because it cannot  
>> know if that function call modifies the memory.
>
> That's why the C99 introduced the "restrict" keyword, to indicate  
> that a variable is pointed to by only one pointer, which avoid  
> aliases, and allow those kind of optimizations. There is a good  
> review, that belongs more to scientific computing about aliasing,  
> Fortran and C++ valarray STL container.

Right, meaning that if the pointer LACKS "restrict", then the compiler  
is NOT free to do the dangerous stuff.

>
>
> Vincent

-- thorpej