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] adjust make_range


> Hmmm, what it appears you're suggesting is that we use the type of
> the expression rather than the type of the argument throughout that
> code.

> Unfortunately, this code doesn't really describe how "type" is used,
> so it is exceedingly difficult to know if this is a safe and correct
> change.  However, my gut tells me the change is wrong.
> 

OK.

> Let's look at the code for the comparison operators -- that code peeks
> at TYPE_UNSIGNED (type).  I'm pretty sure we wanted to refer to the
> type of the argument in that context, not the type of the expression
> (think about it -- the result type of these expression is a boolean).
> 

Not necessarily. In this case the result of the type is the result of
the MINUS_EXPR. This is the case where we have (cond - 2) is the arg0 of
the previous cycle through, however, as you say:

> Rather than continue to propose patches, why don't you describe in
> more detail the ranges at the various stages in this routine.  ie,
> I'm pretty sure you go around the loop in that routine 2-3 times
> for the ((int)cond - 2) > 100 expression.

> That might help us decipher what's happening vs what ought to be
> happening.

I agree. I was doing this last night and for some of the code, the mind
boggles :) Anyhow, I'll do it and post.

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]