Linus Torvalds writes: (Summary) wrote:
That's an unnecessary technicality.
That's an unnecessary technicality.
Any compiler that doesn't get pointer inequality testing right is not worth even worrying about. The divide->multiply thing doesn't always work, and a real divide is really quite expensive on many architectures.
really quite expensive on many architectures.
We *should* be careful about it. I guess sparse could be made to warn, but I'm afraid that we have so many of these things that a warning isn't reasonable.
isn't reasonable.
And most of the time, a pointer difference really is inside the same array.
[...]
compliant with the spec.That's an unnecessary technicality.
That's an unnecessary technicality.
Any compiler that doesn't get pointer inequality testing right is not worth even worrying about. The divide->multiply thing doesn't always work, and a real divide is really quite expensive on many architectures.
really quite expensive on many architectures.
We *should* be careful about it. I guess sparse could be made to warn, but I'm afraid that we have so many of these things that a warning isn't reasonable.
isn't reasonable.
And most of the time, a pointer difference really is inside the same array.