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] Fix PR26898, 2nd try


On Fri, 31 Mar 2006, Richard Guenther wrote:

> On 3/31/06, Joseph S. Myers <joseph@codesourcery.com> wrote:
> > I take it that at this point in folding it is guaranteed that the
> > constants are non-negative, i.e. you don't have to deal with "X + -1" or
> > "X - -1"?
> 
> Hmm I thought they were canonicalized - but now I verified they are not.
> *sigh*  Are there any problems with treating X - -1 as X + 1?

Looks like simply checking that the constants sign match does also do
the job for me.  So we need not worry about X - INT_MIN ...

Richard.


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