Bug in loop optimize (invalid postinc to preinc transformation)

Geoff Keating geoffk@geoffk.org
Thu Dec 28 14:32:00 GMT 2000


Alexandre Oliva <aoliva@redhat.com> writes:

> On Dec 28, 2000, dewar@gnat.com (Robert Dewar) wrote:
> 
> > then this is defined only if the resulting pointer remains within the
> > same object, or in the csae of arrays it can go just past the end. Overflow
> > per se does not arise with pointers because of this stricter rule.
> 
> Only if the compiler guarantees that no array will ever be placed
> across the wrapping boundary.

Since 0 is not a valid pointer---that is, no pointer to an object
should ever compare equal to 0---this makes pointers a case of
unsigned integers for which overflow is not permitted.

I know that there are 32-bit architectures on which GCC runs in which
it's perfectly possible that an array will be placed across
0x80000000.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


More information about the Gcc mailing list