On 25-Jun-2007, Daniel J Sebald wrote:
| I get your point, but that example is fraught with all kinds of
| compiler casts. The (x << 1) is probably cast to a regular int
| first and then bit shifted.
Yes, that was my point (and it is promoted to int as required by the
C rules for usual arithmetic conversions, so you can remove probably
from the above).
Since no other operations on the intX types in Octave/Matlab do that
kind of promotion, I don't think we should do it for these either. So
there is one immediate difference between how C behaves and how it
seems Octave should for the same operator.