"Jim Schram" <[EMAIL PROTECTED]> wrote in message
news:2410@palm-dev-forum...
> This issue has nothing to do with the size of the variable -- we're
> talking about an undefined behavior between various compilers for sign
> promotion in mixed-sign expressions. In this and all previous examples 10
> and 10L are promoted to unsigned integers, which I believe is the reason
> the compiler is incorrectly generating an unsigned multiply opcode.
What gives the compiler the right to change *any* of the subexpression:
(signed long) (((signed long) (y - z)) * 10L)
to unsigned, especially given that the (intermediate) result is cast as
signed?
Stephen Best
Bitware Australia
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html