This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Pointer arithmetic rules in the tree optimizers?
On Thu, Aug 19, 2004 at 06:23:25PM -0700, James E Wilson wrote:
> This looks wrong to me. I think the Fortran front end is just trying to
> make the types match, without realizing that pointer arithmetic is
> different.
Except, as discussed previously, pointer arithmetic *isn't* different
in trees, which is why it's slightly broken. Law investigated several
potential solutions, all of which turned out to be painful. Nothing
to date has been done.
> > 2. In cp/parser.c we are generating 'P = X + Y', where 'P' is of
> > pointer type, '+' is of pointer type. But *both* 'X' and 'Y'
> > are plain integers.
>
> Not enough info to go on, but it does look suspiciously wrong.
This indeed is incorrect.
r~