value range propagation for _bitwise_ OR

Fawzi Mohamed fawzi at gmx.ch
Tue Apr 13 03:36:11 PDT 2010


On 13-apr-10, at 12:01, bearophile wrote:

> Fawzi Mohamed:
>> I guess that I am missing something obvious, so I don't see the  
>> reason
>> for range propagation, but maybe I am not the only one, so thanks for
>> an explanation...
>
> Range propagation can improve the situation a little, so it's not  
> bad. But it can't replace proper integral overflows. You need  
> integral overflows at runtime.

integral overflow are helpful only if you have automatic conversion to  
a larger type, but that breaks the compile time knowledge of the size  
of such an integer, so that you have to assume that it might need to  
be pushed to the heap.
Yes you might use some tricks (like using size_t.sizeof*8-1 bits, or a  
pointer to spare some place), but I don't think that D wants to go  
that way for the basic integers...

>
> Bye,
> bearophile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100413/75aeebfb/attachment.html>


More information about the Digitalmars-d mailing list