This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc3 vs 176.gcc
- From: Joe Buck <jbuck at synopsys dot COM>
- To: rth at redhat dot com (Richard Henderson)
- Cc: jbuck at synopsys dot COM (Joe Buck), geoffk at redhat dot com (Geoff Keating),dalej at apple dot com (Dale Johannesen), gcc at gcc dot gnu dot org
- Date: Wed, 9 Jan 2002 13:06:20 -0800 (PST)
- Subject: Re: gcc3 vs 176.gcc
> On Wed, Jan 09, 2002 at 12:28:36PM -0800, Joe Buck wrote:
> > I think that the check happens too late if it is done this way.
> > Better to detect that the rules are broken at the time of tree->RTL
> > conversion.
>
> Yes, this is nice, but,
At least it lets us issue a warning reliably. The issue is whether
the backend can cope.
> > and note that the type of rt is not pointer to (possibly cv-qualified)
> > int or unsigned, we know already that the rules have been broken,
> > independent of what the backend is.
>
> As soon as you start breaking up the expression into multiple
> variables, we'll lose this overall view.
I guess we need to figure out where to insert the indication that
something is broken. In
((int *)rt)[length]
it seems that the breakage is at the point where we form
((int *)rt)
in a context where we will later dereference it. That's a single
variable so there is only one thing to flag. Of course, we might
have had
((int *)(rt+offset))[length]
But it still seems, in my naive view, that there should be a way of
convincing the back end that the relevant pointer needs to be treated
like a char* pointer for the purposes of aliasing (can alias with
any type).