Signed word lengths and indexes

BCS none at anon.com
Thu Jun 17 06:53:20 PDT 2010


Hello Don,

> Surprise! c == -1.

No kidding!

> Because 1 is an int, b gets promoted to int before the shift happens.

Why would it ever need to be promoted? Unless all (most?) CPUs have only 
size_t shifts, all three shifts should never promote the LHS.

-- 
... <IXOYE><





More information about the Digitalmars-d mailing list