On 2006-06-30, David Brown <da...@westcontrol.com> wrote:

> Just for fun, I tried compiling the code with "two" changed to an unsigned
> char.  My mps430 compiler (3.2.3) then gives
>
>     mov.b &P6IN, r15
>     rla.b r15
>     mov.b r15, &two
>     ret
>
> In other words, it makes the same mistake you did and
> disregards the "volatile" qualifier.  This is far more serious
> than the original question - it is incorrect code, rather than
> just inefficient code.

Yow! That is pretty scary.  

Embedded code depends pretty heavily on the compiler's proper
observance of the "volatile" keyword. Having a compiler ignore
it is a serious bug in my world.

Damn.  It might be time to spring for the Rowley compiler.

-- 
Grant Edwards                   grante             Yow!  My FAVORITE group
                                  at               is "QUESTION MARK & THE
                               visi.com            MYSTERIANS"...


Reply via email to