Don wrote: > Jérôme M. Berger wrote: >> Steven Schveighoffer wrote: >>> On Sun, 11 Apr 2010 22:36:33 -0400, Rainer Deyke <[email protected]> >>> wrote: >>>> On 4/11/2010 13:16, Ali Çehreli wrote: >>>>> Rainer Deyke wrote: >>>> If you want 100% percent accuracy then you probably shouldn't be using >>>> (min, max) pairs to represent your ranges anyway, since this is already >>>> a simplification. >>> Range propagation is needed to determine if you can put a value into a >>> smaller type. >> >> If that was all we wanted, we wouldn't need to have a precise maxOr >> since the output of the "or" operation is guaranteed to fit in the >> same width as the operands. The reason we need to be precise is for >> future propagation, at which point being able to handle holes in the >> range could be useful (but too expensive in both time and memory to >> be practical in a compiler). >> >> Jerome > > Remember that the OR may be part of a larger expression. There may be > something like: > > uint a, b; > ubyte c = (a|b) + 6; > That is why I started my reply with "if that was all we wanted"...
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
