Subject: Re: linux-next: manual merge of the rr tree

From: David Miller <[email-masked]>
Date: Thu, 08 Jan 2009 14:25:10 -0800 (PST)

From: Christoph Lameter <[email-masked]>
Date: Thu, 8 Jan 2009 16:21:32 -0600 (CST)

> On Thu, 8 Jan 2009, Andi Kleen wrote:
> 
> > On Thu, Jan 08, 2009 at 03:15:48PM -0600, Christoph Lameter wrote:
> > > This also then means that RELOC_HIDE can simply be pointer arithmetic on
> > > non PPC, right?
> >
> > No, the C standard and the gcc optimizer are the same on all architectures.
> 
> The wrapping is okay on platforms that use straight 2 complement without
> additional tricks in high bits. Some platforms do not wrap.

It's not okay for loop termination conditions and that's where GCC
takes advantage of this invariant.

Otherwise, if overflow is possible, tranforming an array index
comparison into a pointer comparison is no longer legal.