This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug in loop optimize (invalid postinc to preinc transformation)



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>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]