Integer promotion... what I'm missing? (It's monday...)
Paolo Invernizzi
arathorn at NOSPAM_fastwebnet.it
Mon Jun 19 19:06:37 PDT 2006
Deewiant wrote:
> Tony wrote:
>> I would prefer that any type promotions (and any implicit operations for
>> that matter) should guarantee not to introduce any data corruption. In this
>> case, promote both numbers to a third type which can hold all possible
>> values from both.
>>
> I think a warning for all such cases would suffice --- I thought one would be
> emitted for the original code, but evidently not.
Instead of a warning, I would prefer an error, forcing for an explicit
cast if the comparison it's what you really want to to. But only for
rule number 4.
Cheers
---
Paolo
More information about the Digitalmars-d-learn
mailing list