[patch] clean up make_range

Eric Christopher echristo@redhat.com
Thu Jun 24 05:56:00 GMT 2004


On Wed, 2004-06-23 at 18:49, Roger Sayle wrote:
> On Wed, 23 Jun 2004, Eric Christopher wrote:
> > 2004-06-23  Eric Christopher  <echristo@redhat.com>
> >
> >    * fold-const.c (make_range): Cleanup type checking through function.
> >    Remove orig_type. Replace with checks to exp_type and arg0_type.
> 
> This is OK for mainline.
> 

Thanks.

> 

> The comment makes sense once you realize that the "original unsigned
> value" refers to arg0, and "exp" is the value after the type conversion.
> The ambiguity is that make_range operates from outside-in, but the more
> conversional interpretation of type conversion execution is inside-out.
> 
> Perhaps this would be clearer when rewritten as:
> 
>   If we're converting arg0 from an unsigned type, to exp, a signed type,
>   we will be doing the compairson as unsigned....
>   So we have to ensure that we will handle large unsigned values the
>   same way that the current signed bounds treat negative values.  */

Precisely what I was missing. Boy do I feel slow.

Thanks.

-eric

-- 
Eric Christopher <echristo@redhat.com>



More information about the Gcc-patches mailing list