Always false float comparisons

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue May 10 14:44:45 PDT 2016


On 5/9/2016 1:25 PM, Marco Leise wrote:
> There is a whole bunch in this warning category:
>   byte b;
>   if (b == 1000) {}
> "Comparison is always false: literal 1000 is not representable
> as 'byte'"

You're right, we may be opening a can of worms with this.



More information about the Digitalmars-d mailing list