Re: [PATCH] Athlon/Opteron Prefetch Fix for 2.6.0test5 + numbers

From: Kai Henningsen
Date: Fri Sep 19 2003 - 02:13:50 EST


ak@xxxxxxx (Andi Kleen) wrote on 17.09.03 in <20030917211200.GA5997@xxxxxxxxxxxxx>:

> On Wed, Sep 17, 2003 at 01:50:59PM -0700, Linus Torvalds wrote:

> > Also, you do things like comparing pointers for less/greater than, and at
> > least some versions of gcc has done that wrong - using signed comparisons.
>
> Really? Is that any version we still support (2.95+) ?
> It is certainly legal ISO-C. I changed it for now.

It certainly is *not* legal ISO C, and never was.

Pointer comparision is *only* legal in ISO C if both pointers point to the
same object - same variable, or same piece of malloc'd memory. Anything
else is undefined.

MfG Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/