This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] clean up make_range


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]