Incorrect shift warning

When compiling for 64-bit, Rider gives a warning when bit shifting on native ints as if we were compiling for 32-bit.

nint value = 5;
nint result = value >> 35; // incorrect warning in 64-bit mode saying the shift count will be 3 instead of 35.

 

0
1 comment

Dave Cousineau,

Thank you for reporting the issue. I've reproduced this behavior in a testing environment and filed a corresponding issue RSRP-503358 False-positive "Suspicious shift count" please consider following (★) this issue for further updates.

1

Please sign in to leave a comment.