This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] clean up make_range
- From: Eric Christopher <echristo at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Jun 2004 18:52:31 -0700
- Subject: Re: [patch] clean up make_range
- References: <Pine.LNX.4.44.0406231924320.9016-100000@www.eyesopen.com>
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>