phobos's circle CI runs a busted version of DMD

Ali Çehreli acehreli at yahoo.com
Wed Jan 11 19:34:48 UTC 2023


On 1/10/23 17:03, deadalnix wrote:

I am following the code with "Integer Promotions" open:

   https://dlang.org/spec/type.html#integer-promotions

 >      ushort ee = 1028;
 >      ee <<= 5U;
 >      ee >>= 5U;

ee is promoted to 'int' for both operations. 5U is uint.

According to documentation above, 'int' should be converted to 'uint'.

 > Regular compiler: https://godbolt.org/z/TcbjP76fW (prints 1028)
 > Circle CI: 64516 .
 >
 > Someone, the compiler manages to do a signed arithmetic shift on an
 > unsigned.

I agree, this is a bug.

Ali



More information about the Digitalmars-d mailing list