More D newb questions.

Don nospam at nospam.com.au
Tue May 6 02:05:50 PDT 2008


Walter Bright wrote:
> Me Here wrote:
>> Why is D casting my carefully specified ushorts to ints when doing
>> bit-twiddling?
> 
> The C integral promotion rules.

Something there really needs to change.
ushort a = 0;
a = a | a;
currently gives an error message if compiling with -w.
And therefore, bit-twiddling in libraries has to contain ugly workarounds.



More information about the Digitalmars-d mailing list