Why is this not a warning?

Shachar Shemesh via Digitalmars-d digitalmars-d at puremagic.com
Wed Mar 16 23:55:34 PDT 2016


On 16/03/16 23:50, tsbockman wrote:
> On Wednesday, 16 March 2016 at 16:40:49 UTC, Shachar Shemesh wrote:
>> ...
>>
>> People who are marginally familiar with integer promotion will not be
>> surprised to know that the program prints "256". What is surprising to
>> me is that this produced neither error nor warning.
>>
>> The comparable program in C++, when compiled with gcc, correctly warns
>> about signed/unsigned comparison (though, to be fair, it seems that
>> clang doesn't).
>
> While this particular issue can and should be addressed in the compiler
> (see my other reply), in the mean time how about trying out my
> `checkedint` DUB package?

I'm afraid that paying run-time cost to verify correctness is out of the 
question for the type of product weka is building.




More information about the Digitalmars-d mailing list