This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in loop optimize (invalid postinc to preinc transformation)
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: Bug in loop optimize (invalid postinc to preinc transformation)
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 28 Dec 2000 14:32:00 -0800
- CC: kenner at vlsi1 dot ultra dot nyu dot edu, gcc at gcc dot gnu dot org
- CC: dewar at gnat dot com (Robert Dewar)
- References: <20001228134026.EC58D34D93@nile.gnat.com> <orsnn89u6j.fsf@guarana.lsd.ic.unicamp.br>
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>