This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Fix PR33724, fix PR19382 differently
On Thu, 11 Oct 2007, Richard Guenther wrote:
> On Wed, 10 Oct 2007, Eric Botcazou wrote:
>
> > > Which would be the following; testing in progress.
> >
> > Thanks, this would be nicer to Ada. :-)
> >
> > Btw, any particular reason why the new check uses TYPE_POINTER_TO? This field
> > is a little awkward to deal with. Can't we keep using the old idiom from
> > check_pointer_types_r, i.e. testing the pointed-to type instead?
>
> I think there was a particular reason why I chose the other way, but
> I can't remember right now. I'll think about it again.
I remember now ;) If we compare pointed-to types we lose checking of
qualifiers and the ability to handle (void *), as the middle-end strips
qualifiers from the toplevel type before determining compatibility.
So with the old way of checking (volatile int *) and (int *) would be
compatible types. [(int * volatile) and (int *) still are]
Richard.