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

From: Andreas Schwab
Date: Fri Sep 19 2003 - 05:06:27 EST


kaih@xxxxxxxxxxxxxxxxx (Kai Henningsen) writes:

> 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.

Certainly the kernel isn't using ISO C, and never will.

IMHO you can just compare two pointers to char in GNU C and expect to get
a meaningful result. I think the bug Linus was thinking of was some
problems with counting loops where gcc transformed the index variable into
a pointer, but then got the terminating comparison wrong.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
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/