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]
Other format: [Raw text]

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).



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